File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 Badass: Making Users Awesome this week in the Game Development forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Git Push" Watch "Git Push" New topic

Git Push

Isaac Ferguson
Ranch Hand

Joined: Jun 22, 2012
Posts: 441

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

Any idea?
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9763

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

Joined: Jul 20, 2005
Posts: 10403

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]
I agree. Here's the link:
subject: Git Push