What "rebase local changes onto upstream changes" in Pull menu option mean? Can it possibly anyhow change remote branches?
If another user has rebased and force pushed to the branch that you're committing to, a git pull will then overwrite any commits you have based off that previous branch with the tip that was force pushed. Luckily, using git reflog you can get the reflog of the remote branch.
No, locally rebasing doesn't change the remote.
Looks like it is doing git pull --rebase
(vs just git pull
).
Consider this:
remote origin/master has commits: c1 -> c2 -> c3
and your local master looks like: c1 -> c2 -> c4
If you don't use "Rebase" option, Pull will merge c3
into your c4
commit.
With "Rebase" - Pull will first copy c3
to your local master and keep c4
clean and on top: c1 -> c2 -> c3 -> c4
In this example I believe "rebase local changes onto upstream changes" should be preferred.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With