git: Your branch is ahead by X commits
Someone said you might be misreading your message, you aren’t. This issue actually has to do with your
<project>/.git/config file. In it will be a section similar to this:
[remote "origin"] url = <url> fetch = +refs/heads/*:refs/remotes/origin/*
If you remove the fetch line from your project’s .git/config file you’ll stop the “Your branch is ahead of ‘origin/master’ by
Ncommits.” annoyance from occurring.