mercurialtortoisehg

Difference between cloning and pulling in Mercurial


Clone and pull, these operations both are similar in functioning, so does using clone instead of pull make any sense? I mean why should I use clone if it is possible to achieve same thing by pulling an existing repo.


A team working on some application and later a new user say user2 allotted to that application by company then cloning existing repo or pulling existing repo for new entry(user2), which 1 is better? comparison b/w clone/pull


Solution

  • When you clone a repository then you are making a new copy, this can be an expensive process. Also if you only use clone then you will risk losing any local changes you may have made.

    When you pull then this just updates your repository with any changes that have been made on the parent repository, as it is just incorporating differences this will be a much more efficient process.

    I recommend you go though this tutorial: http://hginit.com/ https://web.archive.org/web/20180807202438/http://hginit.com/