Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

EGIT rejected non-fast forward

Tags:

eclipse

egit

I'm on Eclipse 4.2.1 (Java) and trying to use EGIT. My account is all set up on Github. No one else is working on it so there are no changes. I have a very simply project containing a single file with one print statement. I created my local repo and added the project. (project explorer shows: [gitrepo1 master])

In project explorer: right click on project -> team -> remote -> push But I get: master: HEAD [rejected - non-fast-forward]

I've configured the push: Branch -> master URI -> ssh.git@github.... Ref mappings -> HEAD:/refs/heads/master

What am I doing wrong?

like image 594
mike Avatar asked Mar 07 '13 03:03

mike


1 Answers

We had this problem, because we amended a commit after pushing it.

The solution was to merge origin/master (in Branches > Remote tracking), then push.

like image 171
Bernát Avatar answered Sep 29 '22 22:09

Bernát