Skip to content

Instantly share code, notes, and snippets.

@th0j
Last active July 9, 2018 08:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save th0j/45f4f5b218d3dc92b0ab8764686f6959 to your computer and use it in GitHub Desktop.
Save th0j/45f4f5b218d3dc92b0ab8764686f6959 to your computer and use it in GitHub Desktop.

Show top 10 comments

history | awk '{CMD[$2]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "% " a; }' | grep -v "./" | column -c3 -s " " -t | sort -nr | nl | head -n10

Delete all local branch except master and develop

git branch | grep -v "(master\|develop)" | xargs git branch -D'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment