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

后端 未结 12 680
刺人心
刺人心 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 09:01

    A command that I use on Linux for cleaning up, saves the need to do a fresh search with find.

    These need to be run from the root directory of the Mercurial project

    hg status | grep ".orig" | cut -d ' ' -f 2- | xargs rm -f

    Or if you want to clear all unknown files.

    hg status | cut -d ' ' -f 2- | xargs rm -f

提交回复
热议问题