Can someone clarify what's the exact difference between update and pull commands?
Thanks.
Description. Pull changes from a remote repository to a local one. This finds all changes from the repository at the specified path or URL and adds them to a local repository (the current one unless -R is specified).
hg update --clean. Cancel an uncommitted merge and lose changes. hg revert. Undo all uncommitted changes.
hg update : http://www.selenic.com/mercurial/hg.1.html#update
hg pull : http://www.selenic.com/mercurial/hg.1.html#pull
So when you do an hg pull, you bring changes to your repository which is under .hg
. It will not reflect in your working directory.
After that, when you do a hg update
, the changes are brought to your working copy.
Your repo Remote Repo \ \ | hg pull | |-.hg <-------------------------------- |-.hg | | --------------------------------> | | hg update hg push | | | | |- working folder |- working folder
This is very usual confusion when coming from subversion like version control systems.
In subversion : svn update bring the changes from central repo server to your working copy
But in DVCSs , you have both a local repository and working copy. So update does exactly the same but pulls the changes from your local repo to local working copy.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With