Tony
Tony

Reputation: 1869

Git status no longer displays when branch is ahead of remote repository by x commit

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,

Upvotes: 3

Views: 932

Answers (1)

kan
kan

Reputation: 28951

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?

Upvotes: 5

Related Questions