Why do I need hg update after hg pull while in git I'm doing only git pull

In git to pull and use the latest changes to my local repository I’m using git pull.

In hg, I also use hg pull but it prints then

  • Merge changes from one repo to another with different tree structures
  • Using repo in Cygwin to download Android source
  • Can I mark a GIT remote as read only?
  • Create custom GitLab API
  • updating github wiki file through git
  • git svn clone of a single directory of SVN repository
  • run ‘hg update’ to get a working copy

    I do run hg update but I wonder why is this difference from git?

  • heroku and github at the same time
  • Git merge one branch in all other branches
  • Emacs: why shell-command “git log” works, but “git shortlog” doesn't?
  • Remove a file from Git in Visual Studio
  • Techniques to handle a private and public repository?
  • Avoiding merge conflict
  • 3 Solutions collect form web for “Why do I need hg update after hg pull while in git I'm doing only git pull”

    The other answers don’t actually answer the question, which is: why don’t Git and Mercurial work the same? Is there a philosophical difference?

    In Mercurial, pull is the opposite of push: it syncs the local repo with a remote repo without touching the working copy. So it’s more consistent.

    In Git, pull is a fetch plus a merge, or a pull plus an update in Mercurial terms. Usually this is what you want. So it’s more efficient.

    The Distributed Version Control University talk has a slide at the 4-minute mark that clearly demonstrates the way Mercurial works. Michael Ernst’s Version control concepts and best practices has a similar diagram (included below):

    Distributed version control

    Because git pull internally performs git fetch and git merge, whereas hg pull only does what git fetch does. Just do hg pull -u instead. See also this command equivalence table.

    To get equivalent git functionality enable the fetch Mercurial extension (bundled with Mercurial distributions), see fetch extension. It will execute a hg pull -u.

    Git Baby is a git and github fan, let's start git clone.