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

git pull --rebase overwrites/deletes empty commits

From
BBBastian Binder <bastian.binder1@gmail.com>
Date
Jan 7, 2016, 12:56 UTC
Message-ID
<CAL8XmJ2tp3A1NY_5BoNNLr=g+D4KUa7-iZy7_3E8kCUhSjNGAg@mail.gmail.com>
Hello,

I have recently encountered a probable bug in git. We have messages we want to appear in the log and do an empty commit:

git commit --allow-empty -m "message we want to publish"

After this commit, we do a fetch-rebase in order to pull the intermediate commits into the local branch before pushing:

git pull --rebase branch origin branch

Problem is: the pull --rebase will delete the empty commit. I see git rebase has a --keep-empty option. I cannot find such option for the pull --rebase operation.

Thanks in advance,
Bastian
Message 1 of 1 in “git pull --rebase overwrites/deletes empty commits”
  1. Bastian BinderJan 7, 2016

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.