Last active
February 17, 2024 20:00
Revisions
-
raylee revised this gist
Feb 17, 2024 . No changes.There are no files selected for viewing
-
raylee revised this gist
Feb 17, 2024 . 1 changed file with 6 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,3 +10,9 @@ --format='%(HEAD)%(color:bold blue)%(refname:short)|%(color:green)%(committerdate:relative)|%(color:blue)%(authorname)|%(color:reset)%(subject)' \ | column -ts'|' \ | bash -c '"cut -c1-$((20 + $(stty size -F /dev/stderr | cut -f2 -d\" \")))"' # fetch-all: retrieve all branch data from the remote. This can download a lot of data! fetch-all = "!f(){ git checkout --detach 2>/dev/null \ && git fetch --tags origin '+refs/heads/*:refs/heads/*' \ && git branches; }; f" -
raylee created this gist
Feb 17, 2024 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ [alias] # branches: List recent branches sorted by date # ${COLUMNS} is the standard environment variable to use to get the terminal's width. Unfortunately # git sanitizes that away. git 2.31 will have a way to keep that variable. For now, extract it from # the environment via stty. The below adds 20 to that value to account for the overhead of ANSI # color sequences. branches = !git for-each-ref refs/heads \ --color=always \ --sort=-committerdate \ --format='%(HEAD)%(color:bold blue)%(refname:short)|%(color:green)%(committerdate:relative)|%(color:blue)%(authorname)|%(color:reset)%(subject)' \ | column -ts'|' \ | bash -c '"cut -c1-$((20 + $(stty size -F /dev/stderr | cut -f2 -d\" \")))"'