lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Git conflicts


From: Rune Zedeler
Subject: Re: Git conflicts
Date: Fri, 20 Jun 2008 20:04:06 +0200
User-agent: Thunderbird 2.0.0.14 (X11/20080502)

Johannes Schindelin skrev:
Hmm, perhaps the best thing is to branch off a new branch (dev/rune2) just before the merge, and then cherry-pick the commits I did after the revert...?

This would be a rebase.

Basically, you have to find out what the relationship is between the two branches you are trying to merge.

You can do that witk "gitk <branch1> <branch2>" (graphically), or with "git show-branch <branch1> <branch2>" (text-mode).

Yep. Problem is that we had a accidental with a merge into my branch. This was undone right after (that is, 3 weeks after, but I had made no work in the intermediate time) with git revert. Except for that my development has been strictly linear and a merge should be very simple to do. But apparently this little quirk has confused git so that merge gives conflicts en masse.

Now, if there are only a couple of commits you want to transplant, say HEAD~15..HEAD, onto another branch, say "remotes/dev/rune2", you can call this command:

        $ git rebase -i --onto remotes/dev/rune2 HEAD~15

$ git branch
* dev/rune
  master
$ git branch dev/rune2 HEAD~6
$ git rebase -i --onto dev/rune2 HEAD~3
Usage: /usr/bin/git-rebase [-v] [--onto <newbase>] <upstream> [<branch>]
$

:-(

(is it correctly understood that the above should effectively make dev/rune2 correspond to dev/rune except for HEAD~5 and HEAD~4 missing?)

-Rune




reply via email to

[Prev in Thread] Current Thread [Next in Thread]