* Allow empty commits to be rebased
@ 2010-12-24 0:48 Mihai Rusu
0 siblings, 0 replies; only message in thread
From: Mihai Rusu @ 2010-12-24 0:48 UTC (permalink / raw)
To: git
Hi
When trying to rebase empty Git commits (git commit --allow-empty),
"git rebase" (and "git rebase -i") just skip the empty commits. This
may make some sense in the context of "git rebase" trying to determine
if the code to be rebased already exists in "upstream" but in our case
we need to rebase purely because of parent changes. Playing with "git
rebase", the only way to force it to rebase empty commits was to do
something like:
$ git rebase -i --onto upstream HEAD~N # where N is the number of
commits we want rebased
And then for every empty commit it stops as if it got a conflict, I
have to issue git commit --allow-empty and then git rebase --continue
(if I just run git rebase --continue as I should it skips the empty
commit). If I drop "-i" or if I don't use the onto/HEAD~N trick I'm
not able to rebase empty commits.
If you don't think that "git rebase" should support rebasing of empty
commits by default then please consider adding an --allow-empty
argument to enable such functionality.
Thanks!
--
Mihai Rusu
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-12-24 0:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-24 0:48 Allow empty commits to be rebased Mihai Rusu
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).