File tree 1 file changed +21
-0
lines changed
1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # list all local branches, but formatted reall purdy
4
+
5
+ # format="%(HEAD) %(color:yellow)%(refname:short)%(color:reset)|%(color:bold red)%(objectname:short) %(color:bold blue)%(committerdate:relative) %(color:dim white)%(authorname)%0a %(color:black) %(color:reset)|%(contents:subject)%0a |%0a"
6
+ format=" %(HEAD) %(color:yellow)%(refname:short)%(color:reset)|\
7
+ %(color:bold blue)%(objectname:short) %(color:bold red)%(committerdate:relative) %(color:dim white)%(authorname)%0a\
8
+ %(color:black) %(color:reset)|%(contents:subject)%0a\
9
+ |"
10
+
11
+ # for all known branches..
12
+ # sort descending by last commit,
13
+ # show local branches instead of remotes. (omit "refs/heads/" to include both local and remote branches)
14
+ # break into columns
15
+ # use the pager only if there's not enough space
16
+
17
+ git for-each-ref \
18
+ --sort=-committerdate refs/heads/ \
19
+ --format=" $format " \
20
+ | column -ts ' |' \
21
+ | less --tabs=4 -RFX
You can’t perform that action at this time.
0 commit comments