How to automatically remove all .orig files in Mercurial working tree?

后端 未结 12 690
刺人心
刺人心 2020-12-13 08:34

During merges mercurial leaves .orig file for any unresolved file. But after manually resolving problems and marking a file correct it does not delete the .orig file. Can it

12条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-13 08:57

    If you just want to delete the .orig files, and you happen to be on a Windows computer, the following seems to work well:

    D:\workspace>hg purge -I **/*.orig --all
    

    This will delete all untracked files that end in .orig, but won't delete other untracked files, as the other answers would.

    You can test this before running it by putting the --print flag in as well.

提交回复
热议问题