1

I have this message on git status:

# On branch YYY
# Your branch is ahead of 'origin/XXX' by 10 commits.
#
nothing to commit (working directory clean)

Branch YYY is child of branch XXX. But normally on git status I would expect:

# On branch YYY
# Your branch is ahead of 'origin/YYY' by 10 commits.
#
nothing to commit (working directory clean)

Git fetch does not solve the problem. Any ideas?

Output of git branch -avvv (filtered):

* XXX                              0d64037 [origin/YYY: ahead 10] test
  remotes/origin/XXX               0d64037 test
albanx
  • 6,193
  • 9
  • 67
  • 97

1 Answers1

1

Check the output of git branch -avvv

Maybe YYY has been set to track origin/XXX.

You can change it with:

git branch branch_name -u your_new_remote/branch_name
git branch YYY -u origin/YYY

# for git older than 1.8
git branch YYY --set-upstream origin/YYY

You will need to push YYY at least once, before seeing anything about origin/YYY in the git status output.

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