Mercurial cherry picking changes for commit

后端 未结 10 1357
长情又很酷
长情又很酷 2020-12-01 01:15

Say, I made many changes to my code and only need to commit a few of those changes. Is there a way to do it in mercurial? I know that darcs has a feature like t

10条回答
  •  萌比男神i
    2020-12-01 02:04

    First you must forget everything you ever knew about GUI's and return to the commandline. Next from the commandline do this:

    hg stat > filelist.txt

    This pipes all your modified files into a text file called filelist.txt

    Next edit your filelist to include only the files you wish to commit.

    Finally commit using the fileset sytnax:

    hg commit "set: 'listfile:test.txt'"

提交回复
热议问题