handling git "fatal: upstream - not something we can merge"

2,358 views
Skip to first unread message

claudio canepa

unread,
Oct 16, 2013, 11:11:13 PM10/16/13
to nikola-...@googlegroups.com

This is the third time I see the git's
"fatal: upstream - not something we can merge"
while trying to update my feature branch with changes in getnikola/nikola master.

Theres probably some command or change in workflow to get out of that situation but I don't know a good one (so far I got a patch for the feature branch, deleted the branch, created a new one with the same old  root and applied the patch with git am. Thats totally unfuny, let me tell.

So, lets me describe my usual workflow:

git branch feature-branch
git checkout feature-branch

<bang code, commit, repeat>

# moving changes in getnikola/nikola master to the local feature branch
git checkout master
git fetch upstream master
git merge upstream master

git checkout feature-branch
git rebase master

# update my github feature branch, will show in the getnikola/nikola PR
git push origin feature-branch -f

 
Now, I don't edit on master, and indeed git status on master gives no changes, still the git merge upstream master gives the "fatal: not something we can merge".

Googling for that sugest that the history in upstream (getnikola/nikola for me) was changed. But I see the last hash in my master is still present in the github view of getnikola/nikola master.
:
Summary: I don't know what is going here.


 

Chris “Kwpolska” Warrick

unread,
Oct 17, 2013, 4:03:40 AM10/17/13
to Nikola—Discuss
On Thu, Oct 17, 2013 at 5:11 AM, claudio canepa <ccan...@gmail.com> wrote:
>
> This is the third time I see the git's
> "fatal: upstream - not something we can merge"
> while trying to update my feature branch with changes in getnikola/nikola
> master.
> […]
> git checkout master
> git fetch upstream master
> git merge upstream master

For merge and rebase, you need upstream/master.

Also, I suggest to do rebases instead of merges. This is not any
policy right now, just a nice thing to do.

>
> git checkout feature-branch
> git rebase master
>
> # update my github feature branch, will show in the getnikola/nikola PR
> git push origin feature-branch -f
>
>
> Now, I don't edit on master, and indeed git status on master gives no
> changes, still the git merge upstream master gives the "fatal: not something
> we can merge".
>
> Googling for that sugest that the history in upstream (getnikola/nikola for
> me) was changed. But I see the last hash in my master is still present in
> the github view of getnikola/nikola master.
> :
> Summary: I don't know what is going here.

Summary: Just a tiny syntax error that many people would call git being dumb.

--
Chris “Kwpolska” Warrick <http://kwpolska.tk>
PGP: 5EAAEA16
stop html mail | always bottom-post | only UTF-8 makes sense

claudio canepa

unread,
Oct 17, 2013, 7:17:57 AM10/17/13
to nikola-...@googlegroups.com
On Thu, Oct 17, 2013 at 5:03 AM, Chris “Kwpolska” Warrick <kwpo...@gmail.com> wrote:
On Thu, Oct 17, 2013 at 5:11 AM, claudio canepa <ccan...@gmail.com> wrote:
>
> This is the third time I see the git's
> "fatal: upstream - not something we can merge"
> while trying to update my feature branch with changes in getnikola/nikola
> master.
> […]
> git checkout master
> git fetch upstream master
> git merge upstream master

For merge and rebase, you need upstream/master.

Yes!. Tested in the stalled local repo, worked. Thanks.
 

Also, I suggest to do rebases instead of merges.  This is not any
policy right now, just a nice thing to do.


Excuse my ignorance, what would be exactly the command desired ? Guessing git commands is a risky business.

 
>
> git checkout feature-branch
> git rebase master
>
> # update my github feature branch, will show in the getnikola/nikola PR
> git push origin feature-branch -f
>
>
> Now, I don't edit on master, and indeed git status on master gives no
> changes, still the git merge upstream master gives the "fatal: not something
> we can merge".
>
> Googling for that sugest that the history in upstream (getnikola/nikola for
> me) was changed. But I see the last hash in my master is still present in
> the github view of getnikola/nikola master.
> :
> Summary: I don't know what is going here.

Summary: Just a tiny syntax error that many people would call git being dumb.

--
Chris “Kwpolska” Warrick <http://kwpolska.tk>
PGP: 5EAAEA16
stop html mail | always bottom-post | only UTF-8 makes sense

--
You received this message because you are subscribed to the Google Groups "nikola-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nikola-discus...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Chris “Kwpolska” Warrick

unread,
Oct 17, 2013, 7:20:24 AM10/17/13
to Nikola—Discuss
On Thu, Oct 17, 2013 at 1:17 PM, claudio canepa <ccan...@gmail.com> wrote:
>
>
>
> On Thu, Oct 17, 2013 at 5:03 AM, Chris “Kwpolska” Warrick
> <kwpo...@gmail.com> wrote:
>>
>> On Thu, Oct 17, 2013 at 5:11 AM, claudio canepa <ccan...@gmail.com>
>> wrote:
>> >
>> > This is the third time I see the git's
>> > "fatal: upstream - not something we can merge"
>> > while trying to update my feature branch with changes in
>> > getnikola/nikola
>> > master.
>> > […]
>> > git checkout master
>> > git fetch upstream master
>> > git merge upstream master
>>
>> For merge and rebase, you need upstream/master.
>
>
> Yes!. Tested in the stalled local repo, worked. Thanks.
>
>>
>>
>> Also, I suggest to do rebases instead of merges. This is not any
>> policy right now, just a nice thing to do.
>>
>
> Excuse my ignorance, what would be exactly the command desired ? Guessing
> git commands is a risky business.

This should work:

git rebase upstream/master

Alternatively, you can cheat:

git config --global pull.rebase true
gut pull upstream master
Reply all
Reply to author
Forward
0 new messages