Examining a changeset in HG

前端 未结 5 1885
执念已碎
执念已碎 2020-12-24 06:08

How can I examine a changeset in mercurial without looking up its parent? In mercurial, what\'s the equivalent of

git show HEAD^

Git-show

5条回答
  •  鱼传尺愫
    2020-12-24 06:29

    If you just want to see the contents and differential of a commit, use this:

    hg diff -c 
    

    To see the commit you've checked out (HEAD in git), do this:

    hg diff -c -1
    

    If you want to see the commit before it (HEAD^ in git), do this:

    hg diff -c -2
    

    Simple.

提交回复
热议问题