git/list[1] front-page[2] threads[3] people[4] search[5] about
 

git rebase -i and final newline

From
Steven Penny <svnpenn@gmail.com>
Date
Oct 26, 2012, 02:09 UTC
Message-ID
<CAAXzdLUvDkdPJqF+xgnZ51LQ-vfB1Jea5Pf9PvRS+qHx1+RZuw@mail.gmail.com>

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.

Message 1 of 1 in “git rebase -i and final newline”
  1. Steven PennyOct 26, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.