svn - What is the difference between git pull and git merge?
ringa_lee
ringa_lee 2017-05-02 09:52:42
0
2
1062

Git pull and git merge both merge the code of other branches into the current branch, so what are the specific differences in different scenarios??

ringa_lee
ringa_lee

ringa_lee

reply all(2)
某草草

You will know after using it, git pull = git fetch + git merge
The fetch and push commands can fetch and push the remote branch respectively, but pull does not directly talk to the remote branch.
The difference between fetch and pull is: git fetch: gets the latest version from the remote to the local, and does not automatically merge
And git pull gets the latest version from the remote and merges it into the local warehouse
From a security perspective, git fetch is better than git pull It is safer because we can first compare the differences between local and remote and then merge them selectively.
git push pushes to master by default. If there are multiple branches, multiple branches will be pushed to the remote together

伊谢尔伦

git pull = git fetch + git merge
少用git pull多用git fetch

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template