Table of contents
If you don’t know how to create a remote repository and configure git , please click the link
1. Download and install the plugin
Select Extensions – Manage Extensions – Search for Gitee Extension for VS
The download process is slow, please wait. Please close Visual Studio after downloading, it will install automatically!
2. Re-open Visual Studio
Select View – Team Explorer – Click Connect – Enter Gitee’s account and password
3. Close VS, open it again – select clone repository
The repository address is the address of the website ‘s Gitee repository
Path to choose a local empty folder
4. After opening, the code in the cloud has been cloned
Then start pulling, changing, and pushing! ! !
1. Branch (git branch command)
The default branch of git is generally master. Of course, this can be modified. We have completed a development on master and generated a stable version, then when we need to add new functions or make changes, we only need to create a new branch, and then create a new branch on this branch. After the development is completed, it can be merged into the main branch. The branch function solves the problem of the stability conflict between the version under development and the online version.
2. Pull (git pull command)
It is used to fetch the updates of a branch of the remote warehouse and merge it with the local warehouse.
3. Change (git commit command)
Comment on the changed content! write as complete as possible
4. Push (git push command)
Used to update the local code to the remote repository.
5. Commit (git commit command)
Git’s version management is actually the management of commits. Git uses a 40-byte hexadecimal string to identify each commit. Each commit has a unique identifier, and can be rolled back arbitrarily according to this identifier.
Note: The first push reports an error
Getting error while pushing branch to remote repository: rejected Updates were rejected because the remote contains work that you do not have locally
Solution: Execute the code with Git Bash Here in the local repository directory
$ git pull origin master --allow-unrelated-histories
Then you can push and pull! ! !
If this blog is helpful to you, please remember to leave a comment + like it.