Fork me on GitHub

I'm using magit, and i notice that if I'm on a branch A, and I want to rebase on some upstream master branch, I do a rebase, but it shows that "changes unpulled from A" afterward


I'm not clear on why this is. When I pull, it then adds the same changes to the log as from the rebase, so it appears twice.


it sounds like it is more likely saying there are changes unpulled from {remote name}/A where the remote is set as the pushRemote (IIRC). That message would be correct because your local branch has modified its history.


also, you should not “pull” after doing a rebase like that.


the thing is I push my local branch to that remote that it's saying I haven't pulled from


so I'll push that up to the upstream, then rebase on master


I can’t follow that. does upstream equal the remote?


so my branch A is branched off of upstream/master. I then make a bunch of changes and commit them locally, and push it to upstream/A. I then do a rebase, which updates the history properly, but then it says, "unpulled changes from upstream/A"


and magit is telling you the truth because now all those commits locally have new hashes and they are different from upstream/A


You now have some questions to ask yourself like: is upstream/A being shared with anyone else / are they working on it? If not, you can probably safely force push to upstream/A


but you should definitely not pull after a rebase


given that scenario


ah I see, so either force push or just don't push until rebase is done?