Skip to content

Instantly share code, notes, and snippets.

@davepeck
Created April 29, 2010 01:43
Show Gist options
  • Save davepeck/383003 to your computer and use it in GitHub Desktop.
Save davepeck/383003 to your computer and use it in GitHub Desktop.
What is git trying to tell me?

I don't understand Git.

Why am I told I'm ahead of origin/master by 1 commit?

Why does it go away after what appears to be a no-op git push?

Here's an example interaction with git:

dave@machine ~/dev/project > git status
# On branch master
# Your branch is ahead of 'origin/master' by 1 commit.
#
nothing to commit (working directory clean)

dave@machine ~/dev/project > git pull origin master
From github.com:davepeck/project
 * branch            master     -> FETCH_HEAD
Already up-to-date.

dave@machine ~/dev/project > git status
# On branch master
# Your branch is ahead of 'origin/master' by 1 commit.
#
nothing to commit (working directory clean)

dave@machine ~/dev/project > git push origin master
Everything up-to-date

dave@machine ~/dev/project > git status
# On branch master
nothing to commit (working directory clean)
dave@machine ~/dev/project > git log --decorate -n 5

commit 7b8f49d3ac6a22c05c98307dbb07d0279553e766 (HEAD, origin/master, origin/HEAD, master)
Author: XXX
Date:   Wed Apr 28 16:42:35 2010 -0700

    Basic XXX service.

commit 199c15776d956809bbc26f5c970fffb251411d3b
Author: XXX
Date:   Tue Apr 27 18:22:00 2010 -0700

    Organize XXX.

commit dee8cc9f2070d0d39028f21b71bca3bf9dfbf44e
Author: XXX
Date:   Tue Apr 27 18:02:56 2010 -0700

    Stashing connection stuff.

commit 50f239c0c40ea79663d2cd770d4889f1c1bbece1
Author: XXX
Date:   Tue Apr 27 16:18:33 2010 -0700

    Connect button and a little reorg.

commit b5c05f66aa2346c283b3f03c6b62f0d5181e70cc
Author: XXX
Date:   Tue Apr 27 15:46:49 2010 -0700

    XXX service. This initial checkin includes a XXX plugin that advertises a service and the basic code to discover it on XXX.
@katylava
Copy link

katylava commented Feb 3, 2012

Did you ever get an answer for this? It happens to me too on servers my projects are deployed to. I never want to git push from there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment