You can try:
git remote show origin
That would display the remote 'HEAD branch
':
C:\Users\VonC\prog\git\git>git remote show origin
* remote origin
Fetch URL: https://VonC@github.com/VonC/git
Push URL: https://VonC@github.com/VonC/git
HEAD branch: master <<==============
Remote branches:
maint tracked
master tracked
next tracked
pu tracked
todo tracked
Local refs configured for 'git push':
master forces to master (up to date)
next forces to next (up to date)
This isn't a definitive answer though, because you can see:
Fetch URL: https://github.com/git/git
Push URL: https://github.com/git/git
HEAD branch (remote HEAD is ambiguous, may be one of the following):
maint
master
In that case, you need to go to the GitHub repo itself, and see what default branch is set.
Regarding your push, check:
git status
(to see if you are on a branch, or in a DETACHED HEAD)
git branch -avvv
(to see which branch is supposed to push to where)