Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env bash
- # Show the upstream tracking branch for HEAD
- git rev-parse --abbrev-ref --symbolic-full-name '@{u}'
- # Show the upstream tracking branch for `my-branch`
- git rev-parse --abbrev-ref --symbolic-full-name 'my-branch@{u}'
- # List each local branch along with its upstream tracking branch
- git for-each-ref --format='%(refname:short) <- %(upstream:short)' refs/heads
Add Comment
Please, Sign In to add comment