|
|
|
|
|
by cliff_badger
1875 days ago
|
|
Usage: git branches
Code for your ~/.gitconfig branches = branch -a --sort=-committerdate --format='\
%(HEAD) \
%(if)%(HEAD)%(then)\
%(color:"#329664")%(objectname:short)%(color:reset) \
%(color:"#222222")[%(committerdate:short)]%(color:reset) \
%(color:green)%(refname:short)%(color:reset) \
%(else)\
%(if)%(upstream)%(then)\
%(color:"#999999")%(objectname:short)%(color:reset) \
%(color:"#222222")[%(committerdate:short)]%(color:reset) \
%(refname:short) \
%(color:"#ffc662")%(upstream:track)%(color:reset) \
%(else)\
%(color:"#963232")%(objectname:short)%(color:reset) \
%(color:"#222222")[%(committerdate:short)]%(color:reset) \
%(color:red)%(refname:lstrip=1)%(color:reset)\
%(color:"#ffc662")%(upstream:track)%(color:reset) \
%(end)\
%(end)\
'
Meaning HASH Commit_date Branch_Name
A white branch_name means it is local.
Red means it is remote.
Yellow branch_name is the current branch.
It will also tell you if your checked out branch is ahead or behind the remote branch.
|
|