Cool! I wouldn't have guessed that. Now you wrote it into the mailing list
archives. It would be even better if it were mentioned in the user's manual,
chapter "Rewriting history and maintaining patch series"
There are two cases of "git merge" operation: the one that creates a diamond
commit, and the one that doesn't (the "simple" case of "git merge"). The latter
operation I found useful in achieving this surgery:
C---D---E topic
/
A---B master
=>
C---D---E topic
/
A---B---C---D---E master
How do I do this, if not by using "git merge"? Is there a way to do it with
"git rebase" only?
If I have a certain task at hand, what rule of thumb would you give me,
when can I do it with "git rebase", and when can I do it with the simple case
of "git merge"?
I regularly use "git repack -a -d", so that branches like that
master@{1} get garbage collected. So from the point of view of someone
who considers only the contents of the commits that sit on branches,
it *does* cut the branch.
I know that all commits are still present and reachable by their ID,
as long as they have not been garbage collected. But when doing
branch surgery, only the contents of the labelled branches matters to me.
Oh, I do and did know all this. There is no confusion about that. My problem
was that
- I had a couple of "how do I ..." questions regarding branch surgery,
- the mapping between such a task and the git command to use is not clear
(combinations of "git checkout", "git branch", "git rebase", "git merge",
"git reset", "git cherry-pick" - enough complicated commands to get
confused),
- the user's manual answered only half of my questions.
Bruno
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html