Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit » Help: My Push was rejected(Proceedure on how to resolve file conflicts and push files to remote file server)
Help: My Push was rejected [message #896312] Tue, 17 July 2012 22:34 Go to next message
Jaxim Flash is currently offline Jaxim Flash
Messages: 8
Registered: June 2011
Junior Member
I am attempting to push some committed changes, but it's getting rejected with the following message:

master:master [rejected - non-fast-forward]

I synchronized and discover that a few remote files conflict with some of my committed local files. So I attempt to accept the remote file by performing any of the following actions: "Overwrite", "Merge", "Marked as Merged". However, none of those actions seems to do anything. The files still show up as being in conflict.

I also attempted to perform a "pull", but that too also produces an error. Within the Pull window, the "fetch result" states "No ref to fetch from origin - everything up to date". The "Update Result" states "Failed".


I am obviously a relatively new user to git and egit, so I would appreciate any help in what I should do to resolve the conflicts so I can upload my changes.

thanks!

Jack


[Updated on: Tue, 17 July 2012 22:45]

Report message to a moderator

Re: Help: My Push was rejected [message #896431 is a reply to message #896312] Wed, 18 July 2012 07:44 Go to previous messageGo to next message
R Shapiro is currently offline R Shapiro
Messages: 307
Registered: June 2011
Senior Member
This is a general Git question, not EGit per se. You should have a look at Scott Chacon's book:http://git-scm.com/book/

The short answer is: pull, resolve conflicts, commit, push again.
Re: Help: My Push was rejected [message #896447 is a reply to message #896431] Wed, 18 July 2012 08:18 Go to previous messageGo to next message
Jaxim Flash is currently offline Jaxim Flash
Messages: 8
Registered: June 2011
Junior Member
I've tried that. I tried to pull, but it told me it "Failed". I tried to resolve conflicts by Overwriting, but nothing happens.
Re: Help: My Push was rejected [message #896468 is a reply to message #896447] Wed, 18 July 2012 09:18 Go to previous messageGo to next message
R Shapiro is currently offline R Shapiro
Messages: 307
Registered: June 2011
Senior Member
I recommend you avoid doing any operations in the synchronization view in egit. It's ok for comparing the current state of you active branch against some other branch or reference, but for day-to-day development you never need the synchronization view as you would in CVS or SVN. Forget whatever patterns you were using before, Git is fundamentally different.
Re: Help: My Push was rejected [message #896490 is a reply to message #896468] Wed, 18 July 2012 10:03 Go to previous messageGo to next message
Jaxim Flash is currently offline Jaxim Flash
Messages: 8
Registered: June 2011
Junior Member
ok. I'm still at a loss on how on to sync my files and then upload my changes.
Re: Help: My Push was rejected [message #896773 is a reply to message #896490] Thu, 19 July 2012 12:50 Go to previous messageGo to next message
Jaxim Flash is currently offline Jaxim Flash
Messages: 8
Registered: June 2011
Junior Member
So does anyone know what my issue is? I tired to do a "Pull" and it tells me everything is up to date, but it says that I have two pulled commits under "Update Result" that failed. Does this mean the pulled commits failed to merge? How do I merge what I pull - and how do I do it so I am sure I can see which version I want to keep? (For this version, anything local I want to overwrite anything I get remotely.)

thanks!
Jack

Re: Help: My Push was rejected [message #896791 is a reply to message #896773] Thu, 19 July 2012 15:06 Go to previous messageGo to next message
Robin Rosenberg is currently offline Robin Rosenberg
Messages: 266
Registered: July 2009
Senior Member
Jaxim Mising name skrev 2012-07-19 18.50:
> So does anyone know what my issue is? I tired to do a "Pull" and it
> tells me everything is up to date, but it says that I have two pulled
> commits under "Update Result" that failed. Does this mean the pulled
> commits failed to merge? How do I merge what I pull - and how do I do it
> so I am sure I can see which version I want to keep? (For this version,
> anything local I want to overwrite anything I get remotely.)

You should get some more info than "failed". Also look in the Error Log
in Eclipse for stack traces.

-- robin
Re: Help: My Push was rejected [message #896807 is a reply to message #896791] Thu, 19 July 2012 17:32 Go to previous messageGo to next message
Jaxim Flash is currently offline Jaxim Flash
Messages: 8
Registered: June 2011
Junior Member
here's a screenshot of what happens when I try to do a "Pull"

URL=
farm9.staticflickr.com/8156/7605849754_46f31e31bb_o_d.jpg

(unfortunately I have less than 25 posts, so i can't include a direct image within this post. Instead you'll have to follow this flickr URL)

[Updated on: Thu, 19 July 2012 17:33]

Report message to a moderator

Re: Help: My Push was rejected [message #897651 is a reply to message #896807] Tue, 24 July 2012 18:04 Go to previous messageGo to next message
Jaxim Flash is currently offline Jaxim Flash
Messages: 8
Registered: June 2011
Junior Member
Unless someone can suggest what I am doing wrong, I'm about to give up on GIT.

Supposedly GIT is the new "hotness" but unfortunately, it seems like it's geared for hard-core linux/git users rather than the casual user. At least that has been my take on it. So if I can't get my GIT to pull, merge, push - then I'm going to return to the land of SVN/subversion.

Does anyone have any suggestions what I am doing wrong?

I appreciate the help!
-Jack
Re: Help: My Push was rejected [message #898535 is a reply to message #897651] Thu, 26 July 2012 10:27 Go to previous messageGo to next message
Jaxim Flash is currently offline Jaxim Flash
Messages: 8
Registered: June 2011
Junior Member
ok. I gave up on GIT and eGIT.

I've returned to using SVN. What egit needs is to make it easier for people to understand what to do next - to guide users to the next step. If the user attempts to push files, it should tell them that they need to perform a PULL action first. If the user attempts a PULL and it fails, then egit should tell the user how to fix the action. If the user needs to resolve some conflicts, it should tell the user the various options (in layman language) on how to resolve those conflicts.

I'm sure hardcore linux/open source people would scoff at the idea of a friendly GUI for GIT, but that is what it needs to make it easy for people to use. Open Source doesn't mean it has to be for the hard core fanatics. Just look at Android. Open Source could be inviting.

In any case, I have returned to using SVN/subclipse - another open sourced project which could also be improved with a better GUI but at least it is slightly easier IMHO to understand than GIT.

If anyone has ideas where I went wrong with GIT, then I am still willing to attempt any suggested solutions.

thanks,
Jack
Re: Help: My Push was rejected [message #989406 is a reply to message #896312] Thu, 06 December 2012 01:21 Go to previous messageGo to next message
Gorbunov Pavel is currently offline Gorbunov Pavel
Messages: 1
Registered: July 2012
Junior Member
I'm not hardcore linux user. I can only use gui, and i using svn before. Have this problems too and i don't understand ideology of git. First read this post, then forget that and just looking around interface of synchronize view and thinking simple, i make:
1) fetch remote changes
2) team - advanced - synchronize - my remote branch. Merge and fix local changes. Then mark project as merged.
3) commit project.
4) push - oops, non-fast-forward.
5) configure push - enable "force update" (because of "non-fast-forward" substring in help message Smile).
6) push again. All is ok.
Re: Help: My Push was rejected [message #991604 is a reply to message #989406] Wed, 19 December 2012 15:50 Go to previous messageGo to next message
David Coates is currently offline David Coates
Messages: 2
Registered: December 2012
Junior Member
I and everyone on my team has the exact same problem. Half the team already switched to NetBeans. I'm last hold out and about to give up. eGit just does not seem to work.
Re: Help: My Push was rejected [message #991612 is a reply to message #989406] Wed, 19 December 2012 16:16 Go to previous messageGo to next message
David Coates is currently offline David Coates
Messages: 2
Registered: December 2012
Junior Member
When I try to do an EGit Pull, I get the Pull Result dialog box that says, "Fetch Result No ref to fetch from origin - everything up to date." However, it's not up to date. Update Result says Result Failed and there are two updates listed in the Merge input area. Also the error Log shows a java.lang.ArrayIndexOutOfBoundsException with the following session Data:
eclipse.buildId=3.1.0.201210061306-RELEASE-e42
java.version=1.7.0_05
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments: -product org.springsource.ggts.ide
Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.springsource.ggts.ide

Re: Help: My Push was rejected [message #996372 is a reply to message #991612] Tue, 01 January 2013 18:07 Go to previous messageGo to next message
Robin Rosenberg is currently offline Robin Rosenberg
Messages: 266
Registered: July 2009
Senior Member
David Coates skrev 2012-12-19 22.29:
> When I try to do an EGit Pull, I get the Pull Result dialog box that says, "Fetch Result No ref to fetch from origin - everything up to date." However, it's not up to date.
> Update Result says Result Failed and there are two updates listed in the Merge input area. Also the error Log shows a java.lang.ArrayIndexOutOfBoundsException with the
> following session Data: eclipse.buildId=3.1.0.201210061306-RELEASE-e42
> java.version=1.7.0_05
> java.vendor=Oracle Corporation
> BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
> Framework arguments: -product org.springsource.ggts.ide
> Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.springsource.ggts.ide
The Eclipse/JRE version information can't hurt but it rarely helps. What often does help
is the stack trace of an error, if there is one and. The version of the EGit plugin is sometimes
helpful.

The latest release, 2.2, of EGit contains a bug fix that may cause bogus merge failures, which in turn are
not reported in a way that is helpful to a user, so please try it out. I would not expect an
ArrayOutOfIndexException here, so it might be something we do not know about.

The reporting issue is not fixed in 2.2, but hopefully it'll be in a nighly build.
Look for https://git.eclipse.org/r/#/c/9386

-- robin
Re: Help: My Push was rejected [message #1001944 is a reply to message #989406] Thu, 17 January 2013 10:37 Go to previous messageGo to next message
Chris Raastad is currently offline Chris Raastad
Messages: 1
Registered: January 2013
Junior Member
This more or less worked with me. I had the same issue when trying to sync the first time to a project on my github account. It took some playing with steps 1-4 but it eventually worked.

Gorbunov Pavel wrote on Thu, 06 December 2012 01:21

1) fetch remote changes
2) team - advanced - synchronize - my remote branch. Merge and fix local changes. Then mark project as merged.
3) commit project.
4) push - oops, non-fast-forward.
5) configure push - enable "force update" (because of "non-fast-forward" substring in help message Smile).
6) push again. All is ok.

Re: Help: My Push was rejected [message #1014944 is a reply to message #1001944] Tue, 26 February 2013 16:59 Go to previous message
Abby Bader is currently offline Abby Bader
Messages: 3
Registered: February 2013
Junior Member
Jack,

My team had this problem a lot. The workflows that work with git and eGit seem to be:

EITHER:
1) commit local changes
2) pull changes (merge is automatic)
3) resolve any merge conflicts, ADDING files once the conficts are resolved

OR:
1) stash local changes
2) pull changes (no merge is needed)
3) apply stashed changes
4) verify that you haven't overwritten any pulled changes, because there's a bug in the current release of eGit


Both of these workflows should get you to a state where you can either continue working or commit if you're ready. The former is easier to do, so if you happen to be ready to commit -- do it.

Takeaway: Always commit or stash before you try to pull.


I agree that git seems to be harder, conceptually. I'm not in love with it, but it's what my team is using. I have high hopes that the plugin will continue to improve, now that the Eclipse devs are using it. (Right?)
Previous Topic:Get event generation source from ExecutionEvent object
Next Topic:android adding external libraries to index
Goto Forum:
  


Current Time: Wed May 22 12:03:54 EDT 2013

Powered by FUDForum. Page generated in 0.02082 seconds