TortoiseGit: What's the difference between "Git Sync", "Fetch" and "Pull"?
These are three different commands:
- Git
pull
is a gitfetch
followed by gitmerge
- read here - Git
fetch
fetches info about remote repositories - read here - Git
sync
does everything in one command meaningpull
andpush
read here
If you want to compare git
and svn
workflow then git pull
is like svn update
. There's no direct svn
version of git fetch
. Git sync
is like svn up
&& svn commit
in one command
You can do a git fetch at any time to update your remote-tracking branches under refs/remotes//.
git fetch
operation never changes any of your own local branches under refs/heads, and is safe to do without changing your working copy. I have even heard of people running git fetch periodically in a cron job in the background (although I wouldn't recommend doing this).
git pull
is what you would do to bring a local branch up-to-date with its remote version, while also updating your other remote-tracking branches.