What is the difference between git remote update, git fetch and git pull?
I'm starting to play with Git now and I'm a little bit confused. For me, looks like there are a lot of options to do the same thing. My question, for now, is what is the difference between the commands below:
- git remote update
- git fetch
- git pull
Also which one is more applicable for update a local copy of a remote branch?
To update your Git remote you can follow the below command:
git remote update can update all of your branches set to track remote ones, however it cannot merge any changes in it.
git fetch can update only the branch you are on, however not merge any changes in.
git pull can update and merge any remote changes of the present branch you are on.
This would be the one you use to update a local branch.