Fork me on GitHub
#emacs
<
2018-08-21
>
theeternalpulse21:08:42

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

theeternalpulse21:08:08

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.

cmack22:08:42

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.

cmack22:08:12

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

theeternalpulse22:08:36

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

theeternalpulse22:08:53

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

cmack22:08:00

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

theeternalpulse22:08:10

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"

cmack22:08:29

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

cmack22:08:12

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

cmack22:08:49

but you should definitely not pull after a rebase

cmack22:08:05

given that scenario

theeternalpulse22:08:43

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