Last active
April 26, 2024 07:45
-
-
Save koiralakiran1/ab4fc5867e8ea9d7f7356eb4ead9e13b to your computer and use it in GitHub Desktop.
Git recent branches
This file contains 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 characters
#!/usr/bin/awk -f | |
BEGIN { | |
FS=" ~~ " | |
print "\033[1;31mYour recent checkouts:\n" | |
} | |
{ | |
print "\033[1;32m"$1"\033[0;32m ("substr($2,7,index($2,"}")-7)") [\033[1;33mCommitted by:\033[1;34m",$4"\033[0;32m on "$5"\033[0m] \n ", | |
$3"\n" | |
#print "\033[1;32m"$1"\033[0;32m ("substr($2,7,index($2,"}")-7)")\033[0m | "$3, | |
# "\n [\033[1;33mCommitted by:\033[0m",$4"\033[0;32m on "$5"\033[0m] \n" | |
} |
This file contains 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 characters
#!/usr/bin/env bash | |
# alias git_recent="..." | |
git reflog show --pretty=format:'%gs ~~ %gd ~~ %s ~~ %an ~~ %ch, (%cr)' --date=relative | grep -i 'checkout:' | grep -oE '[^ ]+ ~~ .*' | awk -F~ '!seen[$1]++' | head -n 10 | ./git_recent_checkouts.awk |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment