vs2019 uses gitee (code cloud) collaborative development

table of Contents

1. Download and install the plugin

Second, reopen Visual Studio

3. Close VS and open it again-select clone repository

4. After opening, the cloud code has been cloned

Note: The first push report error


If you still don't know how to create a remote warehouse and configure git , please click the link

1. Download and install the plugin

Select extension-manage extension-search for Gitee Extension for VS

The download process is slow, please wait a moment. Please close Visual Studio after downloading, it will be installed automatically!

Second, reopen Visual Studio

Select view-Team Explorer-click to connect-enter Gitee account and password

3. Close VS and open it again-select clone repository

The repository address is the address of the Gitee warehouse on the website

Path to choose a local empty folder

4. After opening, the cloud code 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 complete a development in master and generate a stable version. Then when we need to add new features or make changes, we only need to create a new branch, and then on that branch After development, you can merge to the main branch. The branch function solves the problem of stability conflicts between the version under development and the online version.

2. Pull (git pull command)

It is used to retrieve the update of a branch of the remote warehouse and merge it with the local warehouse.

3. Change (git commit command)

Make a note of the changed content! Try to write it completely

4. Push (git push command)

Used to update the local code to the remote warehouse.

5. Submit (git commit command)

Git's version management is actually the management of submissions. Git uses a 40-byte hexadecimal string to identify each submission. Each submission has a unique identifier. According to this identifier, it can be rolled back at will.

Note: The first push report error

An error was encountered when pushing the branch to the remote repository: rejected Updates were rejected because the remote contains work that you do not have locally

Solution: Use Git Bash Here to execute code in the local warehouse directory 

$ git pull origin master --allow-unrelated-histories

Then you can push and pull it! ! !

If this blog is helpful to you, please remember to leave a message + like it.

Guess you like

Origin blog.csdn.net/promsing/article/details/109180132