You can't use "merge" to get a single changeset in git the way it works in bzr,
that's what cherry-pick is for. If you try that when there is more than one
commit difference you'll see you get the entire history up to the commit you
try to merge.

You can "cherry-pick" the changes introduced by a range of commits from
one branch into another, but which creates _new_ commit ids like you saw.

Remember, in git a commit represents a snapshot of the entire state, not a diff.
You can merge snapshots, or cherry-pick diffs.

I guess this is why gitworkflows mandates all changes to be made in branches,
which can then be cleanly merged into multiple places, making it clearer that
the change has made its way into both next and master.

Martin

On 13 May 2013 11:01, Garth N. Wells <[email protected]> wrote:
> On 13 May 2013 09:36, Martin Sandve Alnæs <[email protected]> wrote:
>> The git term "merge" is very different from "cherry-pick", so I'm not
>> a bit confused about what you try to say here.
>>
>
> I'm not using git speak, and I know both exist. I wanted to 'cherry
> pick' a bit of the history of one branch and have to appear in another
> branch.
>
>> I'm referring to lots of commit messages in the master branch with
>> commit messages "merge foobar into next".
>> These could only have gotten there through a fairly large merge of
>> next into master, not by a cherry-pick.
>>
>
> There was a mistaken wholesale merge of next into master a while ago.
>
>> Did you want to do "git cherry-pick <commit>" but instead did a "git
>> merge <commit>"?
>>
>
> I tried both. In the first instance, with the cherry-pick command the
> change appeared in master, but it still appeared on Bitbucket in the
> next branch as being ahead of master. This is confusing because it's
> then unclear whether or not a change has made its way into master.
>
> I then tried merging a single changeset from next. From the outcome
> it's still not clear to me exactly how this works because the change
> in question was the only change in next that was ahead of master, so
> only one changset was ever going to be merged.
>
> Garth
>
>> Martin
_______________________________________________
fenics mailing list
[email protected]
http://fenicsproject.org/mailman/listinfo/fenics

Reply via email to