English 中文(简体)
避免在从Gite 合并解决冲突后出现孤儿档案
原标题:Avoid orphaned .orig files after resolving conflicts from a Git merge
  • 时间:2011-10-10 10:51:32
  •  标签:
  • git
  • merge

After I perform a Git merge and resolve the conflicts, there are leftover .orig versions of the conflicting files. How can I automatically delete those after the conflict is successfully resolved?

问题回答

它是编造这些档案的宝库,你可以将这些档案与这一指挥分开:

git config --global mergetool.keepBackup false

See the git-config manpage:

http://man.he.net/man1/git-config

很可能这些档案是由你可能用来合并档案的第3Kiff3工具创建的。 解决这一问题的最容易的方法是:

  1. open KDiff3,
  2. go to Settings / Configure KDiff3 / Directory,
  3. un-tick checkbox "Backup files (.orig)"

我认为这项工作应当做到:

git status -su | grep -e".orig$" | cut -f2 -d" " | xargs rm

。 详情

* 未经编辑。 它只标明了相冲突档案中与<<< ......==......>>>>>的章节。

你们使用什么工具? 你们不得不去掉。

但是,WinMerge等工具确实创造了这些档案,但是当你在编辑中解决档案时,它们自动处理和删除这些档案。

甚至我也遇到同样的错误,当时我复制+从一字文件上接过指挥。 但是,我试图在转换代码之前删除--,并在指挥时人工重新分类。 工作!

这可能是由于在MS_Wrod和Prompt指挥部对Charectes的误解。





相关问题
git confusion - cloning a repo is returning a past version

Im having some confusion with my git usage. I cloned a repo from one comp to the other, and the new clone is the state of the original that was active some time ago. So its cloning a past version. ...

Appropriate strategy for tagging and hotfixing with git

I was wondering if the strategy I m using for tagging and hotfixing tags (which then I use for deploying rails applications) with git is appropriate. For tagging I just tag a commit of the master ...

Tips on upgrading CVS to git/hg?

We still use CVS, I use git and hg for my personal use though I m still a novice at both, but I realize they re much more modern and better, faster, distributed, etc. It s just everyone is so ...

Using Git in a TFS shop

Using Git at home has spoiled me - I now find using TFS at work to be a bit of a drag and want to explore the possibility of using Git locally and syncing somehow with TFS. I figure there are a few ...

热门标签