git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Confusing error message in rebase when commit becomes empty
@ 2014-06-11 12:49 Peter Krefting
  2014-06-11 15:44 ` Phil Hord
  2014-06-13  7:27 ` Jeff King
  0 siblings, 2 replies; 7+ messages in thread
From: Peter Krefting @ 2014-06-11 12:49 UTC (permalink / raw)
  To: Git Mailing List

Hi!

I am rebasing a branch to combine a couple of commits. One is a revert 
of a previous commit. Since there are commits in-between, I do 
"squash" to make sure I get everything, and then add the actual change 
on top of that. The problem is that rebase stops with a confusing 
error message (from commit, presumably):

   $ git rebase --interactive
   [...]
   You asked to amend the most recent commit, but doing so would make
   it empty. You can repeat your command with --allow-empty, or you can
   remove the commit entirely with "git reset HEAD^".
   rebase in progress; onto 342b22f
   You are currently rebasing branch 'mybranch' on '342b22f'.

   No changes

   Could not apply 4682a1f20f6ac29546536921bc6ea0386441e23e... Revert "something"

OK, so I should retry the command with --allow-empty, then:

   $ git rebase --interactive --allow-empty
   error: unknown option `allow-empty'

Nope, that's not quite right.

Running "git rebase --continue" does work as expected, but perhaps it 
just shouldn't stop in this case?

-- 
\\// Peter - http://www.softwolves.pp.se/

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-06-13  7:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-11 12:49 Confusing error message in rebase when commit becomes empty Peter Krefting
2014-06-11 15:44 ` Phil Hord
2014-06-11 17:57   ` Peter Krefting
2014-06-11 19:04     ` Phil Hord
2014-06-13  7:25       ` Peter Krefting
2014-06-13  7:31         ` Jeff King
2014-06-13  7:27 ` Jeff King

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).