From: "Philip Allison" <philip.allison@smoothwall.net>
To: <git@vger.kernel.org>
Cc: "Thomas Adam" <thomas.adam@smoothwall.net>,
"Philip Allison" <philip.allison@smoothwall.net>
Subject: Git rebase using "wrong" commit
Date: Tue, 20 Oct 2009 06:26:22 -0500 [thread overview]
Message-ID: <1256037982.7122.31.camel@gridbug.soton.smoothwall.net> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 3511 bytes --]
Hello all,
We have a specific branch (integration/bug-fixes) which is under
continual rebase, shared amongst several developers. The tracked
instances have "branch.integration/bug-fixes.rebase true" and
"branch.integration/bug-fixes.mergeoptions --no-ff" - this is working
well. Individual developers merge their topic branches (in this case
bug fixes) into integration/bug-fixes and push it out.
Occasionally, we want to release some bug fixes, but not others. IOW,
when integration/bug-fixes comes to be rebased onto master, we wish to
preserve some of the topic branch merges, but not others. This usually
works fine, but an issue has cropped up where there is a conflict
between two fixes, and only one of the two bug fixes has been released;
now, when we come to perform the rebase, it is not working as desired.
Output of "git log --first-parent master..integration/bug-fixes":
-----
commit 9f79ca3928d645435d1608e22297dacd2be94e3b
Merge: 2bc19f9 cd8273f
Author: Philip Allison <philip.allison@smoothwall.net>
Date: Tue Oct 20 10:11:06 2009 +0100
Merge branch 'bug/2' into integration/bug-fixes
* bug/2:
Unify format of files 1, 2 and 3
Conflicts:
file1
commit 2bc19f9af94e03e06fbe5a1034820c606d13c3d3
Merge: c785da2 b17a93c
Author: Philip Allison <philip.allison@smoothwall.net>
Date: Tue Oct 20 10:07:37 2009 +0100
Merge branch 'bug/1' into integration/bug-fixes
* bug/1:
Fix file 1
-----
bug/2 has, effectively, been merged into master; bug/1 has not; hence,
there is not (on master) any equivalent change to that which was made to
resolve the conflict.
"git rebase -i master" output (whilst on HEAD of integration/bug-fixes):
-----
pick b17a93c Fix file 1
# Rebase cd8273f..9f79ca3 onto cd8273f
-----
The trouble here is that b17a93c is the head of bug/1 - the rebase has
picked up the changes from that branch and is trying to apply them as a
fast-forward commit in the newly rebased integration/bug-fixes, instead
of trying to rebase the *merge* of bug/1 (i.e. 2bc19f9).
The "-m" and "-p" options to rebase don't seem to be helping. I have
tried getting rebase to "pick 2bc19f9" via -i, but that isn't working
either:
-----
fatal: Commit 2bc19f9af94e03e06fbe5a1034820c606d13c3d3 is a merge but no
-m option was given.
Could not apply 2bc19f9...
-----
Interestingly, rebase does *not* seem to be trying to recreate 9f79ca3
(or its second parent), which is the problem I was originally expecting
to run into.
At the moment I don't know where to go from here, short of manually
recreating the branch as I want it, which I am loathe to do. Ideas and
suggestions much appreciated.
Please find attached a working copy of the repository, just before any
attempted rebase.
Regards
--
Philip Allison
Senior Developer
SmoothWall Ltd
1 John Charles Way
Leeds LS12 6QA
United Kingdom
1 800 959 3760 (USA, Canada and North America)
0870 1 999 500 (United Kingdom)
+44 870 1 999 500 (All other countries)
SmoothWall is registered in England: 4298247
This email and any attachments transmitted with it are confidential
to the intended recipient(s) and may not be communicated to any
other person or published by any means without the permission of
SmoothWall Limited. Any opinions stated in this message are solely
those of the author. See: http://smoothwall.net/company/email.php
for the full text of this notice.
[-- Attachment #1.2: repo.tar.gz --]
[-- Type: application/x-compressed-tar, Size: 15095 bytes --]
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next reply other threads:[~2009-10-20 12:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-20 11:26 Philip Allison [this message]
2009-10-20 13:21 ` Git rebase using "wrong" commit Thomas Rast
2009-10-20 21:20 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1256037982.7122.31.camel@gridbug.soton.smoothwall.net \
--to=philip.allison@smoothwall.net \
--cc=git@vger.kernel.org \
--cc=thomas.adam@smoothwall.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).