- Current branch local name:
git config alias.lbranch-name 'rev-parse --abbrev-ref HEAD'
git lbranch-name
- Remote tracking branch name:
git config alias.rbranch-name 'rev-parse --symbolic-full-name --abbrev-ref @{u}'
git rbranch-name
git config alias.lbranch-name 'rev-parse --abbrev-ref HEAD'
git lbranch-name
git config alias.rbranch-name 'rev-parse --symbolic-full-name --abbrev-ref @{u}'
git rbranch-name