Why is Git telling me "Your branch is ahead of 'origin/master' by 11 commits." and how do I get it t

Posted by spilth on Stack Overflow See other posts from Stack Overflow or by spilth
Published on 2008-11-10T04:50:26Z Indexed on 2010/04/06 17:03 UTC
Read the original article Hit count: 1782

Filed under:
|

I'm a Git newbie. I recently moved a Rails project from Subversion to Git. I followed the tutorial here: http://www.simplisticcomplexity.com/2008/03/05/cleanly-migrate-your-subversion-repository-to-a-git-repository/

I am also using unfuddle.com to store my code. I make changes on my Mac laptop on the train to/from work and then push them to unfuddle when I have a network connection using the following command:

git push unfuddle master

I use Capistrano for deployments and pull code from the unfuddle repository using the master branch.

Lately I've noticed the following message when I run "git status" on my laptop:

# On branch master
# Your branch is ahead of 'origin/master' by 11 commits.
#
nothing to commit (working directory clean)

And I'm confused as to why. I thought my laptop was the origin... but don't know if either the fact that I originally pulled from Subversion or push to Unfuddle is what's causing the message to show up. How can I:

  1. Find out where Git thinks 'origin/master' is?
  2. If it's somewhere else, how do I turn my laptop into the 'origin/master'?
  3. Get this message to go away. It makes me think Git is unhappy about something.

My mac is running Git version 1.6.0.1.


When I run git remote show origin as suggested by dbr, I get the following:

~/Projects/GeekFor/geekfor 10:47 AM $ git remote show origin
fatal: '/Users/brian/Projects/GeekFor/gf/.git': unable to chdir or not a git archive
fatal: The remote end hung up unexpectedly

When I run git remote -v as suggested by Aristotle Pagaltzis, I get the following:

~/Projects/GeekFor/geekfor 10:33 AM $ git remote -v
origin  /Users/brian/Projects/GeekFor/gf/.git
unfuddle    [email protected]:spilth/geekfor.git

Now, interestingly, I'm working on my project in the geekfor directory but it says my origin is my local machine in the gf directory. I believe gf was the temporary directory I used when converting my project from Subversion to Git and probably where I pushed to unfuddle from. Then I believe I checked out a fresh copy from unfuddle to the geekfor directory.

So it looks like I should follow dbr's advice and do:

git remote rm origin
git remote add origin [email protected]:spilth/geekfor.git

© Stack Overflow or respective owner

Related posts about git

Related posts about git-svn