Skip to content

Instantly share code, notes, and snippets.

@bliotti
Last active October 22, 2023 02:37
Show Gist options
  • Save bliotti/dce2355d49d188db2b045d020b1a800e to your computer and use it in GitHub Desktop.
Save bliotti/dce2355d49d188db2b045d020b1a800e to your computer and use it in GitHub Desktop.
awesome-git-aliases
# Run these once, to set aliases to git
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
git config --global alias.co checkout
git config --global alias.br branch
git config --global alias.ci commit
git config --global alias.st status
git config --global alias.sw switch
# Other useful commands
alias git-latest-tag='git tag | grep -E "v[0-9]+.[0-9]+.[0-9]+$" | sort --version-sort | tail -n 1'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment