*
The moose likes IDEs, Version Control and other tools and the fly likes Git Push Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Git Push" Watch "Git Push" New topic
Author

Git Push

Isaac Ferguson
Ranch Hand

Joined: Jun 22, 2012
Posts: 336
Hi,

I try to push my changes for the first time to GIT and and a pull I get this error



Any idea?
Regards
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9351
    
    2

What happens if you first try to pull and then do a push?


SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10067
    
163

The error message states that the remote repo has received some more commits from the time you pulled in those changes and now your changes that you are trying to push need to first fetch/pull those changes from remote.

One way to do that is:


(where "origin" is the local logical name to your remote repo)

Once the rebase is done cleanly, you can then push your changes to remote repo.

[My Blog] [JavaRanch Journal]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Git Push