English 中文(简体)
git 合并——重复承诺的可能性?
原标题:git merge - possibility to duplicate commits?
  • 时间:2011-11-09 10:07:46
  •  标签:
  • git

当我设立一个新的分支,做一些承诺,然后将分支部门重新归为主时,我只得到一个新承诺,其中包括所有承诺的所有变化。 是否有合并的办法,承诺在哪里重复到总公司?

例:

A -- B -- C
 
  D -- E -- F

我想将C与F合并,以便我能够做到以下几点:

A -- B -- C
 
  D -- B  -- E  -- C  -- F 

Or another diagram that shows the same:

A -- B ---- C
           
  D ----- E ----- F

为此,它必须修改从F返回D的EVERY SINGLE COMMIT,并增加我希望合并的承诺的修改版本。 最后,我肯定会作出新的承诺,我只会改变许多承诺。

是否有能够实现这种行为的东西?

最佳回答

您可使用<代码>git cherry-pick复制成另一分支。 还有<代码>git rebase,可能或可能不适合您的工作。

Note that your second graph shows a state that isn t called a merge even if you call it so.

问题回答

暂无回答




相关问题
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 ...

热门标签