[PATCH5 PR gdb/16959] gdb hangs in infinite recursion

Joel Brobecker brobecker@adacore.com
Fri Mar 30 23:41:00 GMT 2018


> $ git push upstream fixes:master
> Enter passphrase for key '/home/wepan/.ssh/id_rsa':
> To ssh://sourceware.org/git/binutils-gdb.git
>  ! [rejected]        fixes -> master (non-fast-forward)
> error: failed to push some refs to
> 'ssh://sourceware.org/git/binutils-gdb.git'
> To prevent you from losing history, non-fast-forward updates were rejected
> Merge the remote changes before pushing again.  See the 'Note about
> fast-forwards' section of 'git push --help' for details.
> 
> Does it mean that I  need to do a "git merge"?

Not quite. It is telling you that your "fixes" branch is behind
upstream's "master".  You need to do a "rebase" your "fixes" branch
instead (while having the "fixes" being the current branch):

    $ git rebase upstream/master

You may have some conflicts to resolve, particularly around
ChangeLog files.

Once that's done, do a "git show" to make sure your commit looks
exactly the way you think it should look (in particular, that
the "diff" contains exactly the changes you mean to push).
And then, once done, try the push command again.

-- 
Joel



More information about the Gdb-patches mailing list