Skip to content

Instantly share code, notes, and snippets.

@aubricus
Last active September 5, 2017 23:54
Show Gist options
  • Save aubricus/92bc95b27d1455356941ba6ab2a6623d to your computer and use it in GitHub Desktop.
Save aubricus/92bc95b27d1455356941ba6ab2a6623d to your computer and use it in GitHub Desktop.
Some helpful .gitconfig aliases for following a commit format
# Commit with scope / message shortcuts
# Remember to quote $2 if it contains spaces
#
# Usage:
# git <alias> <scope> "<Commit Message>"
#
# Example:
# git chore docs "Update README.md"
chore = "!f() { git commit -m \"chore($1): $2\"; }; f"
fix = "!f() { git commit -m \"fix($1): $2\"; }; f"
hotfix = "!f() { git commit -m \"hotfix($1): $2\"; }; f"
refactor = "!f() { git commit -m \"refactor($1): $2\"; }; f"
feature = "!f() { git commit -m \"feature($1): $2\"; }; f"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment