Skip to content

Instantly share code, notes, and snippets.

View gitcheats.txt
# sort git tags by date
git for-each-ref --sort=taggerdate --format '%(tag)_,,,_%(taggerdate:raw)_,,,_%(taggername)_,,,_%(subject)' refs/tags | awk 'BEGIN { FS = "_,,,_" } ; { t=strftime("%Y-%m-%d %H:%M",$2); printf "%-20s %-18s %-25s %s\n", t, $1, $4, $3 }'
# delete all local tags, and update with list of remote tags
git tag -l | xargs git tag -d && git fetch -t
# get list of all author's emails of the repo
git log --format="%ae" | uniq
# shortform git commands