What's the easiest way to commit and push a single file while leaving other modifications alone?

后端 未结 6 2083
佛祖请我去吃肉
佛祖请我去吃肉 2020-11-28 19:15

I\'m relatively new to Mercurial and my team is trying it out right now as a replacement for Subversion.

How can I commit and push a single file out to another rep

6条回答
  •  日久生厌
    2020-11-28 19:44

    Since you said easiest, I often use hg commit -i (--interactive) even when committing whole files. With --interactive you can just select the file(s) you want rather than typing their entire path(s) on the command line. As an added bonus you can even selectively include/exclude chunks within the files.

    And then just hg push to push that newly created commit.

    I put more details on using hg commit --interactive in this answer: https://stackoverflow.com/a/47931672/255961

提交回复
热议问题