From: Johannes Schindelin Date: Tue, 16 Jun 2015 14:56:43 GMT Subject: Re: rebase -i might leave CHERRY_PICK_HEAD behind Message-ID: In-Reply-To: <20150616140612.Horde.a1irZQmh2o42SqDfxAytHg1@webmail.informatik.kit.edu> Hi, On 2015-06-16 14:06, SZEDER Gábor wrote: > When skipping an empty commit with 'git rebase --continue' a > CHERRY_PICK_HEAD file might be left behind. Yeah, I noticed that, too... it even survives the cleanup of the finished rebase under certain circumstances. Maybe something like this? -- snipsnap -- diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index dc3133f..16e0a82 100644 --- a/git-rebase--interactive.sh +++ b/git-rebase--interactive.sh @@ -849,7 +849,11 @@ continue) # do we have anything to commit? if git diff-index --cached --quiet HEAD -- then - : Nothing to commit -- skip this + : Nothing to commit -- skip this commit + + test ! -f "$GIT_DIR"/CHERRY_PICK_HEAD || + rm "$GIT_DIR"/CHERRY_PICK_HEAD || + die "Could not remove CHERRY_PICK_HEAD" else if ! test -f "$author_script" then