The difference between git pull and git fetch

  

1.git pull merges the latest version from the remote to the local. For example: git pull origin master 2.git fetch to get the latest version from the remote to the local, but not merged, you can manually compare the differences, merge. For example: git fetch origin master git log -p master..origin/master git merge origin/master or git fetch origin master:temp git diff temp git merge temp

Copyright © Windows knowledge All Rights Reserved