get remote branch name code example
Example 1: how to check upstream git
$ git branch -vv
main aaf02f0 [main/master: ahead 25] Some other commit
* master add0a03 [jdsumsion/master] Some commit
Example 2: get a remote branch git
$ git checkout --track origin/newsletter
Branch newsletter set up to track remote branch newsletter from origin.
Switched to a new branch 'newsletter'