threads / discuss / 31947

git rebase -i and final newline

Subject: git rebase -i and final newline

## tl;dr

One message between Oct 26, 2012 and Oct 26, 2012.

replies: 0people: 1as markdown or json

Steven Penny· Oct 26, 2012, 02:09 UTC · lore

Sorry if I am drumming up and old issue here. I have noticed that with "git rebase -i", if your final line contains a commit and no newline, git interprets that as "remove this commit please".

I feel that a commit should be removed only if the entire line is removed, that is the commit hash and title as well as the newline.

I have noticed that the behavior is "correct" with "git commit". Even if you omit the final newline after the commit message body, all text lines will be included.

← back to recent threads