How to delete .orig files after merge from git repository?

Some how .orig files are checked in my git repository during merge, which are now displayed in modified and un-tracked sector. But I don't want this files anymore in my repository. How to do that.

    modified:   Gemfile.lock.orig
    #   modified:   Gemfile.orig
    #   modified:   app/assets/images/bg_required.png.orig
    #   modified:   app/assets/javascripts/application.js.orig

    etc...

Any help will be appreciated.


在这种情况下,最好的解决方案是保持简单,并独立于git摆脱这些文件:

cd /your/repo/directory
find . -name '*.orig' -delete 

尝试git clean更多信息,你可以在这里或这里找到


you can do:

git config --global mergetool.keepBackup false

For more info, refer to to Git mergetool generates unwanted .orig files

链接地址: http://www.djcxy.com/p/3284.html

上一篇: 只显示Git中的当前分支

下一篇: 如何从git仓库合并后删除.orig文件?