Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » Inconsistency between Egit and GitHub(Unable to push to GitHub)
Inconsistency between Egit and GitHub [message #1775968] Wed, 08 November 2017 16:38 Go to next message
Jonathan Gossage is currently offline Jonathan GossageFriend
Messages: 71
Registered: March 2010
Location: Ottawa, ON, Canada
I have made a small modification to a single file using Egit Oxygen on Windows 10 using my Development branch and tried to push the change to the server using the Git staging view.

Egit told me it could not merge the changes because it was a non-fast forward merge. I then tried to pull the branch from the GitHub server and was told that there was nothing to pull as everything was up to date.

What do I need to do to resolve this situation?
Re: Inconsistency between Egit and GitHub [message #1775996 is a reply to message #1775968] Wed, 08 November 2017 23:31 Go to previous message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1154
Registered: July 2009
Senior Member
The error comes from the GitHub server. Most git servers do not provide auto-merge on the server side.
Hence if the commit you are pushing is not a successor of the current tip of the target branch on the server which
you are pushing to, it rejects the push and you have to fetch the latest tip from the server and then either merge
or rebase so that the resulting commit is a successor of the upstream branch.

I don't know how your repositories look like. I would first fetch from the upstream repository to ensure that
your local clone has all the commits available in the upstream repository and then check in the history view
if your commit(s) you want to push is a successor of the respective remote tracking branch. E.g. if you are pushing
to the upstream master of the remote "origin" check if the tip of the local branch you want to push is a
successor of origin/master. If not either merge origin/master into your local branch or rebase your local branch
onto origin/master and then push again.
Previous Topic:JGit support for default encoding
Next Topic:Constant errors when checking out and pulling
Goto Forum:

Current Time: Tue Sep 22 18:54:17 GMT 2020

Powered by FUDForum. Page generated in 0.02536 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top