3

So I set up a new remote git repo using the following lines:

git remote add origin [link]
git push origin master
[enter password]

In my previous repo, when I make a new commit and check status, it will tell me that my branch is ahead by x commits if I forgot to use git push. However, this new repo no longer shows this when I use git status.

Can anyone tell me how to fix that?

Thanks,

Tony
  • 1,839
  • 10
  • 27
  • 48

1 Answers1

5

The branch is not tracked. You should add add tracking: git branch --set-upstream master origin/master. Make an existing Git branch track a remote branch?

Community
  • 1
  • 1
kan
  • 28,279
  • 7
  • 71
  • 101