Search code examples
version-controlmercurialdvcs

Check in single file with Mercurial?


Let's say you do hg status and you have three files modified. I know how to check in all three files (hg commit). But how can you check in (and then hg push) just one of the modified files?


Solution

  • Please check the output of hg help commit which reveals that you can do

    hg commit foo.c
    

    if you just want to commit a single file. This is just like Subversion and many other systems — no hocus-pocus :-)