git statusするとYour branch is ahead of ‘origin/master’ by x commits

なぜ、この現象が発生するのかよく理解できていませんが、対処法だけ:

git status
# On branch master
# Your branch is ahead of 'origin/master' by 3 commits.
#   (use "git push" to publish your local commits)
#
nothing to commit, working directory clean

と出たら

git pull origin

とする。ソース:

https://freewayprojects.com/2011/11/solving-the-your-branch-is-ahead-of-originmaster-by-x-commits-issue-after-pulling-using-git/