
it didn't happen before, but it happened to me today. What are the possible cause?
Your branch may have an upstream tracking branch.
Try running "git status -sb" when you are on the branch in the command prompt- if it only shows "## <branch_name>" your local branch is not tracked. It would show "## master...origin/<branch_name>" if it were. In this case running "git branch -u origin/<branch_name>" in the command prompt should fix your issue.
In my case I needed to perform for a particular branch that was only local and fulfilled above conditions (as per @amateur's answer) this command:
git push -u <remoteRepoName>
Then the local branch that was not pushable in Visual Studio menus (disabled Push button) started to appear as a standard branch. I do not know why this sometimes happens. But this solves the consequences.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With