git pull --rebase overwrites/deletes empty commits
- From
- Bastian 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