I\'d been working on something, and decided it was completely screwed...after having committed some of it. So I tried the following sequence:
git reset --har
You need to run
git fetch
To get all changes and then you will not receive message with "your branch is ahead".