Sign in
Log inSign up

HOW TO PUSH CODE FROM VS CODE TO GITHUB.

Chiamaka Ochulor's photo
Chiamaka Ochulor
·Jul 19, 2020·

2 min read

The need for technology in our society is rapidly increasing; to get involved is to read materials that will guide and keep practising until you get it right. This write-up shows the step by step on how to push VS CODE to GitHub.

To get started to ensure that you have VsCode also; Git installed on the system, and it has been configured with the desired username and E-mail address.

These following commands can be basically, run via the CLI terminal of VsCode.

Step 1: Navigate to the local project directory and create a local git repository ‘git init’

Step 2: Once that is successful, Click on the ‘source control’ icon on the left nav- bar in VsCode. You should be able to see files ready to be commit-ed. Then Press the ‘commit’ button under the box, stage the changes and commit the files.

Step 3: Visit your github account and create a new repository. Ignore creating ‘README.md’ and do not add any license to the repo. These settings may cause issues while pushing, so it is advisable to ignore.

Step 4: Copy the link to the newly created github repository.

Step 5: Return to VsCode’s terminal and type these commands in succession git remote abd origin<link to git hub repo> git remote -v git push-u origin master

Step 6: Fill in your github account details, Username and Password to proceed.

Step 7: You can also verify by refreshing the github repo online to see the pushed content.

When next you want to push to GitHub, you will have to use the git add ., Git commit -m “file name” and git push -u origin master command.

Hassle-free blogging platform that developers and teams love.
  • Docs by Hashnode
    New
  • Blogs
  • AI Markdown Editor
  • GraphQL APIs
  • Open source Starter-kit

© Hashnode 2024 — LinearBytes Inc.

Privacy PolicyTermsCode of Conduct