hg equivalent of git add -p?

后端 未结 4 605
我寻月下人不归
我寻月下人不归 2021-01-01 08:18

Is there a mercurial equivalent of git add -p?

Quoting from man, git-add with the option -p (or --patch) does the following:

Inte

4条回答
  •  抹茶落季
    2021-01-01 09:02

    As of Mercurial 3.8.1 the crecord extension is builtin. Make sure the “ui” section in your .hgrc contains interface = curses, or you get an uncomfortable question-and-answer-interface.

    [ui]
    interface = curses
    

    Then do your commits interactively to be asked about which hunk—or—which line you want to include in that commit.

    hg commit --interactive
    

提交回复
热议问题