-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Preserve merges when rebasing #56
Comments
Never heard of ORIG_HEAD before - now that I've done a bit of Googling, I'm not sure I follow. ORIG_HEAD is set by Are you saying git-up should behave similarly and set ORIG_HEAD before it does anything, and if so, what does that have to do with preserving merges? |
Sorry for not explaining properly. But first: one uses ORIG_HEAD after git pull/merge to see which changes have been fetched from the server in the git pull/merge, for example like this: git log ORIG_HEAD.. As it is, git-up already behaves properly with regards to ORIG_HEAD. Now to the issue at hand. When doing a regular rebase, any unpushed merge commits will be "flattened out". The rebase command has a --preserve-merges option which preserve merge commits when rebasing. The problem with this option is that it sets ORIG_HEAD incorrectly (look at the "Downsides to git rebase -p" section). So if you could add an option to git-up that preserves merges it would be great! An greater still if you could point ORIG_HEAD to the correct commit afterwards. |
OK. So merges can currently be preserved by setting |
Closing due to quiet - if someone wants to implement and PR this, be my guest. |
Would be nice if git-up preserved merges when rebasing. It seems that can be done by setting a git config variable, though. The only problem left then is setting ORIG_HEAD to the correct value.
The text was updated successfully, but these errors were encountered: