Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Add this to your [aliases] section in ~/.gitconfig
alias = "!sh -c '[ $# = 2 ] && git config --global alias.\"$1\" \"$2\" && exit 0 || echo \"usage: git alias <new alias> <original command>\" >&2 && exit 1' -"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment