How to set up Github for use with Visual Studio Code on Windows
I had a difficult time setting up Github for use with Visual Studio Code but eventually found this article describing how to do it on OSX.
My severe lack of knowledge led to the instructions not actually working but they did lead to the following steps which work for me. I'm including them here because I keep forgetting details of the procedure.
- Use the Git tab/function in Visual Studio Code to put the project's folder under Git control.
- Go to https://github.com and create a new project.
- Click the Clone or download button and copy address of new git.
- Open a terminal window and navigate to the location of the project.
- Enter the following:
git remote add origin {copied_git_address}
. - Open GitHub Desktop and click + button in upper left corner.
- Click Add then enter local path to project folder (use Browse button).
- Click Add repository button.
- Project can now be synced from within VSC.
#add 'node_modules' to .gitignore file
git rm -r --cached node_modules
git commit -m 'Remove the now ignored directory node_modules'
git push origin master