1

I am facing a problem while using the git status. I get this output:

# On branch master
# Your branch is ahead of 'origin/master' by 1 commit.
#
nothing to commit, working directory clean

At first the commit and push for readme(README.md) worked perfectly. How do I solve this?

Dom
  • 1,687
  • 6
  • 27
  • 37
h4kl0rd
  • 625
  • 1
  • 10
  • 23

1 Answers1

2

You solve it by pushing it to master again:

git push
or, if your master branch wasn't tracking origin/master already
git push -u origin master

(See on that "tracking" business "What's the difference between git config and git push --set-upstream" and "hat exactly does the “u” do? “git push -u origin master” vs “git push origin master"

The only time when git push doesn't solve that situation is when you need to do a git fetch in order to update the origin SHA1 that your local repo has in store.
See "git: Your branch is Ahead by X commits".

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250