Search code examples
git

Get the default upstream remote & branch for "git push"


I've been looking at .git/config, but is there a quick way to get this on the command line?


Solution

  • To check for the default remote upstream remote and branch type the following on the command line:

    git remote -v
    

    If you need to see the remote branches at the same time [note this is very verbose]:

    git remote show origin
    

    This will tell you which upstream remotes are available, which ones are being tracked, etc.