$ git remote show origin* remote originFetch URL: /home/ageorge/tmp/d/../exrepo/Push URL: /home/ageorge/tmp/d/../exrepo/HEAD branch (remote HEAD is ambiguous, may be one of the following):abranchmasterRemote branches:abranch trackedmaster trackedLocal branches configured for 'git pull':abranch merges with remote abranchmaster merges with remote masterLocal refs configured for 'git push':abranch pushes to abranch (up to date)master pushes to master (up to date)
git branch -vv | grep 'hardcode-branch-name'# "git rev-parse --abbrev-ref head" will get your current branch name# $(git rev-parse --abbrev-ref head) save it as string# find the tracking branch by grep filtering the current branchgit branch -vv | grep $(git rev-parse --abbrev-ref head)