Take the 2-minute tour ×

I have little problem. I had to format my hdd and with it my git confiruration. And now when I am cloning git repository, committing and checking git status I have:

$ git status
# On branch master
nothing to commit (working directory clean)

but I have no information about how many commits I am ahead of master. Can someone tell me how to enable this option? I reacall that I should modify my config but I am unable to find what should I change.

share|improve this question
What version of git are you running? Also, the remote branch status feature only works when you have remotes. What does "git remote show origin" tell you? –  Lowe Thiderman Sep 25 '12 at 13:01
I am running msysgit v1.7.11. Remote origin is set correctly. Stony found the solution. Thx for attention. –  Darek Sep 25 '12 at 13:30

1 Answer 1

up vote 0 down vote accepted

I think this is no option.

When you commit something to your local repo its on your local PC and you are one commit ahead from your remote branch. So first when you push your commit to the master you have the same state.

I think when you haven't pushed your commit and formated your hdd your changes are lost.

Git doesn't show how many commits ahead of origin I am, and I want it to

Perhaps this could be another solution when you have copied the whole .git directory.

share|improve this answer
Quote "git branch --set-upstream local origin/remote" - that's exactly what I needed. Thx. –  Darek Sep 25 '12 at 13:21
ok great one problem solved :) –  Stony Sep 26 '12 at 8:11

Your Answer


