This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
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 Java Interview Guide this week in the Jobs Discussion 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: 756

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: 10033

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: 10441

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
It's not a secret anymore!