git: Your branch is Ahead by X commits
- by SeanJA
How does this actually come about?
I am working in one repo by myself at the moment, so this is my workflow:
1- change files
2- commit
4- repeat until satisfied
4- push to master
Then when I do a git status it tells me that my branch is ahead by X commits (presumably the same number of commits that I have made). Is it because when you push the code it doesn't actually update your locally cached files (in the .git folders)? git pull seems to 'fix' this strange message, but I am still curious why it happens, maybe I am using git wrong?