Thanks for your suggestion, Thomas, here are the steps that result in the 
weird behaviour:

(in an empty git repo...)

echo "bish bash bosh" >> file1.txt
echo "bish bash bosh" >> file2.txt
echo "bish bash bosh" >> file3.txt
git add .
git commit -m "initial commit"
echo "bish bash bosh" >> file4.txt
git add .
git commit "add file4"
vi .
(do some editing in file2.txt)
git add .
git commit -m "edit file2.txt"
git reflog

shows this:
e519fb1 HEAD@{0}: commit: edit file2.txt
7746811 HEAD@{1}: commit: add file4.txt
5329025 HEAD@{2}: commit (initial): initial commit

git rebase -i 53290

(note it's the hash of the first commit)

Successfully rebased and updated refs/heads/master.

AND also opens a *blank* file called .git/rebase-merge/git-rebase-todo.

I was expecting a pick list to open in the editor.

Any further insight would be appreciated.


On Wednesday, March 21, 2012 3:09:29 PM UTC-7, Thomas Ferris Nicolaisen 
> I haven't experienced this.
> Are you maybe doing git rebase -i <SHA>
> .. where <SHA> is the latest commit in your repo (same as doing git 
> rebase -i HEAD)?
> Usually I rebase like this (if I want to edit the last 5 commits): git 
> rebase -i HEAD~5
> On Wednesday, March 21, 2012 8:11:54 PM UTC+1, Les Nightingill wrote:
>> ...trying to understand how interactive rebase works... 
>> under what circumstances does git rebase -i <sha of some commit> 
>> simply complete and present an empty git-rebase-todo for editing (i.e. 
>> without a list of commits for me to pick/edit/squash etc)? 
>> In my test, the rebase completes with the message "Successfully 
>> rebased and updated refs/heads/newbranch." AND also a blank file (.git/ 
>> rebase-merge/git-rebase-todo) is opened in my editor. 
>> I must be missing something... any suggestions would be appreciated 
>> Les

You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To view this discussion on the web visit
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

Reply via email to