[git] git pull remote branch

1. Process

1.1git clone

Clone the repository.

git clone [email protected]:repo/test1/progect.git

Parameter introduction:

"clone git@": where git is the username. It means to use the field before @ as the website after the user logs in @.

"192.168.1.1": server site. It needs to be replaced with the address of the git server in the actual LAN, which can be a gitweb site, github enterprise server, gitee public website, etc.

"repo/test": where test is the project path. The repo does not need to be modified, you need to change the test and subsequent paths to the actual deployment path of the git warehouse.

"/project.git": The end is mainly to obtain .git type files. After the command is executed, a new folder will be created in the local current path. The folder is named after the file name after removing .git. The above example will be in the local Create a folder called "project". After that, the content managed by git on the server will be copied to this folder.

1.2git checkout

Check out the branch.

git checkout -b dev_xxx origin/master

Parameter introduction:

"dev_xxx": The name of the local branch to be checked out. The local branch is master by default, but in order to avoid polluting the content of the master branch, it is necessary to check out a development branch dev, generally in the form of "dev_"+"project/name/model" name.

"origin/master": The default master branch, which is usually pulled from here. If you need to pull other branches in the remote, you only need to replace "master", and "origin" is to be kept.

1.3git pull

renew.

No parameters.

2. Conclusion

The whole set of operations is similar to ctrl+c/v copy and paste under windows, namely:

Copy a project stored at the remote end to the local paste.

Create a new user to use it.

How to modify it locally will be described later.

Guess you like

Origin blog.csdn.net/qq_34217861/article/details/126285379