visual studio code using git

1, first configure git bin directory path path in the system, when the open visual studio code will automatically recognizes git.
2. Create a warehouse in the cloud and other code or github, copy warehouses address.
3, the initialization
Here Insert Picture Description
4, connected to remote code repository, the input terminal window

git remote add origin 仓库地址
git pull origin master

5, this time will be given:

 The current branch master has no upstream branch.

The first push, remote repository is not yet with the establishment of branch tracing relationship, you need to set upstream, this setting once, then push back the time would not have set up.
Run the code:

git push --set-upstream origin master

I use the master branch, if the other branch, branch into master name.
6, and then you can have fun commit / push code.

Reference: Visual Studio Code using Git for version control

Published 216 original articles · won praise 91 · Views 250,000 +

Guess you like

Origin blog.csdn.net/yu75567218/article/details/100538529