git pull pull code command: pull the remote warehouse code to the local. Of course, the premise of this command is that your local code is linked to the remote code, whether it is upstream or git clone. And by default, the branch associated with the branch in the remote code is pulled and merged with the local branch. At the same time, git pull not only pulls the code, but also merges the pulled code with the local code.
git pull pull code command.
git pull
Function
Pull the latest code from the remote warehouse to the local
Code analysis
git pull
Pull the remote warehouse code to the local. Of course, the premise of this command is that your local code has a link with the remote code, whether it is your upstream or git Clone or not. And by default, the branch associated with the branch in the remote code is pulled and merged with the local branch. At the same time, git Pull not only pulls the code, but also merges the pulled code with the local code.
git pull origin master:master
This line of code is a relatively complete way of writing the previous line of code. Specifies which branch of which remote repository to pull. And merge it into the local branch. Because we may have one local warehouse corresponding to more than one remote warehouse. For example, in the case of fork, we often need to go to the source author's warehouse.
git pull --no-commit
As mentioned above, git pull is actually divided into two steps. One is to pull the code to the local, and git The fetch command has the same effect. The second is to merge the pulled code with the code of the current branch of the local warehouse. This command means that if you pull it down, don’t proceed to the second step.
git pull --verbose
This is to let you see the content of the code you pulled and the specific process of merging it. Generally not used.
The above is the detailed content of git pull pull code command. For more information, please follow other related articles on the PHP Chinese website!