-
Notifications
You must be signed in to change notification settings - Fork 5
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
Update action should use git pull --no-rebase
for integrating upstream changes
#52
Comments
@ndonald2 great point. do you think it makes sense as a gitx default or is this more of a user level default?
https://coderwall.com/p/tnoiug/rebase-by-default-when-doing-git-pull |
Hmm, I think there's a misunderstanding here. I personally do use the user-level git default for rebase pulling, as you described. The issue is that gitx's current implementation doesn't take that into account - it uses whatever the user level default is for pulling, which breaks things if the default is rebase pulling. In the case of I'm suggesting to change the gitx command invocations to forcibly opt-out of rebase pulling, using either method I described. |
I might actually take a stab at a pull request for this. It would be a good ruby refresher :) |
As described in wireframe#52, when the developer has `pull.rebase = true` in their git config, they will get an error when updating due to git attempting to rebase local changes on top of a different remote HEAD. The error can unfortunately be fairly opaque and confusing (e.g. `Updates were rejected because the tip of your current branch is behind`). This fixes the issue by doing a plain merge instead of a rebase.
Fixed in #72 |
Some developers (including myself) prefer to use the "always rebase" configuration option for
git pull
, which avoids creating superfluous merge commits from un-pushed commits when pulling to a local branch from the same corresponding remote branch. This doesn't cause issues as long as you pull to the same corresponding branch, since the local un-pushed commits don't have remote counterparts yet and commit hashes won't be rewritten.However, this does cause issues when pulling from a remote branch that is different from the local destination branch, since it's effectively rebasing local changes onto a totally different remote HEAD, which can cause commits to be rewritten.
I propose changing
git update
and any other command that attempts to pull from a different remote branch to useor alternatively
since that's effectively what the pull should be doing.
The text was updated successfully, but these errors were encountered: