From: Johannes Sixt <J.Sixt@eudaptics.com>
To: git@vger.kernel.org
Subject: How to rebase after upstream was merged?
Date: Wed, 04 Jul 2007 14:24:46 +0200 [thread overview]
Message-ID: <468B918E.FBCADCB9@eudaptics.com> (raw)
I have this history:
o--o--o--o--o <- origin
\ \
x--x--x--M--x--x <- master (HEAD)
At this point I would like to rebase to straighten the history, but it
won't let me:
$ git rebase origin
Current branch master is up to date.
However, if there were additional commits on origin, it would work as
expected, i.e. all the 'x', but not 'M', would be moved on top of
origin. The reason is that rebase checks whether the merge base of
origin and HEAD is origin, and exits early if it is.
I would like to extend the check to also check for linear history. How
can I do this most efficiently? My first try is along these lines:
test $(git rev-list origin..HEAD | wc -l) = \
$(git rev-list --no-merges origin..HEAD | wc -l)
Is there a better approach?
-- Hannes
next reply other threads:[~2007-07-04 13:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-04 12:24 Johannes Sixt [this message]
2007-07-04 13:30 ` How to rebase after upstream was merged? Johannes Schindelin
2007-07-04 13:45 ` Johannes Sixt
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=468B918E.FBCADCB9@eudaptics.com \
--to=j.sixt@eudaptics.com \
--cc=git@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.