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

rebase has no --cleanup option

From
ДПДилян Палаузов <dilyan.palauzov@aegee.org>
Date
Mar 24, 2023, 12:11 UTC
Message-ID
<e2ceba47235e2f7e4f6889954111044d@aegee.org>
Hello,

in rare cases I want to write commit messages with leading # sign and for these messages I call “git commit --cleanup==whitespace”. So far, so good.

Now I want to rebase - modify (edit) the commit message of an old commit, or squash a commit, which has leading # in its comment. I cannot pass --cleanup=whitespace and this is the problem description here — the #-lines disappear after rebase (edit/squash operations).

In theory I could set the commit.cleanup configuration parameter (in .gitconfig), but I prefer not to do this, as I do not want to disable permanently the stripping of lines with leading # in git commit messages.

Please add --cleanup= option to the rebase command.
I use here the command-line git client 2.39.2, not a GUI or whatsoever.
Kind regards
   Дилян
Next: Kristoffer Haugsbakk
Message 1 of 2 in “rebase has no --cleanup option”
  1. Дилян ПалаузовMar 24, 2023
  2. Kristoffer HaugsbakkMar 24, 2023

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.