Re: use case
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Aug 21, 2006, 20:47 UTC
- Message-ID
- <Pine.LNX.4.63.0608212231430.28360@wbgn013.biozentrum.uni-wuerzburg.de>
- In-Reply-To
- <20060821182338.GA21395@daga.cl>
Hi,
On Mon, 21 Aug 2006, Blu Corater wrote:
Show 5 quoted lines
> The main problem I am facing now is that I have been unable to make an > octopus merge from all the branches to consolidate them. When I do a > "git-pull . branch1 branch2..." git tells me "Unable to find common commit > with 5f83..." where 5f83... is the sha1 of the head commit of the first > branch on the command line.
Ideally, you really would have a common revision to start from. Since you do not have that yet, you have to go low-level for the first octopus.
Suppose you have the last common version as tip of branch "ancestor", you could do
git merge-octopus ancestor -- HEAD branch1 branch2 ...
After this -- if everything went well -- you should have a committable state in the index. Before you commit, you should do
git rev-parse branch1 > .git/MERGE_HEAD git rev-parse branch2 >> .git/MERGE_HEAD git rev-parse branch3 >> .git/MERGE_HEAD ...
to tell git that you want to commit an octopus merge. This will tell git-commit what the parents of the merge are.
The next time you do an octopus, you _will_ have a common ancestor, so no need to jump through hoops after the first octopus.
Hth, Dscho