git - 重复父项 [英] git - duplicate parent

查看:252
本文介绍了git - 重复父项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我似乎设法使用eGit(Eclipse的git客户端,由JGit提供支持)使用两个重复的父母进行承诺。





第二个父母导致绿色的分支到无处,我们可以'



我一直在谷歌方式执行一些手术,以提交删除额外的父母,
但无济于事。 p>

运行cat文件我得到:

  $ git cat-file  - p 26dc6a5b44373f766d81513ab84c5eecaf876736 

树527df208ee66f52bc414948b1de0fa6607cfb81c
父bc9d55d0451b325b4ad5a758be8b30c1418b3af9
父bc9d55d0451b325b4ad5a758be8b30c1418b3af9
的作家罗伊·特鲁洛夫< roy.truelove@xxxx.com> 1316457571 -0400
committer Roy Truelove< roy.truelove@xxxx.com& 1316457571 -0400

我正在分享这个repo,这个问题已经被推了,我是肯定会有助于解决方案的复杂性。



感谢git黑客,
Roy



PS - 如果我需要通过eGit执行不可用的功能,那么我有命令行访问这个存储库(cygwin)

解决方案

您可以使用 git filter-branch 重写历史记录;双重父母将自动更正。


I seem to have managed to have a commit with two duplicate parents using eGit (Eclipse's git client, powered by JGit).

The 2nd parent causes that green 'branch to nowhere' that we can't get rid of.

I've been googling ways to perform some surgery on the commit to remove the extra parent, but to no avail.

Running cat-file I get:

$ git cat-file -p 26dc6a5b44373f766d81513ab84c5eecaf876736

tree 527df208ee66f52bc414948b1de0fa6607cfb81c
parent bc9d55d0451b325b4ad5a758be8b30c1418b3af9
parent bc9d55d0451b325b4ad5a758be8b30c1418b3af9
author Roy Truelove <roy.truelove@xxxx.com> 1316457571 -0400
committer Roy Truelove <roy.truelove@xxxx.com> 1316457571 -0400

I'm sharing this repo and this problem has already been pushed, which I'm sure will contribute to the complexity of the solution..

Thanks git hackers, Roy

PS - I do have command line access to this repository (cygwin) if I need to perform a function not available through eGit

解决方案

You can use git filter-branch to rewrite the history; the duplicate parent will automatically be corrected.

这篇关于git - 重复父项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆