Skip to content

Instantly share code, notes, and snippets.

@smzm
Created January 4, 2024 11:02
Show Gist options
  • Save smzm/e5edcb14555a82548aa0b94d3ced47d7 to your computer and use it in GitHub Desktop.
Save smzm/e5edcb14555a82548aa0b94d3ced47d7 to your computer and use it in GitHub Desktop.
Git Aliases

Alias for add, commit and push

  • Run in bash :
git config --global alias.cmp '!f() { git add -A && git commit -m "$@" && git push; }; f'
  • Now, You can use cmp command :
git cmp "my commit"

Alias for add and commit

  • Run in bash :
git config --global alias.ac "!git add -A && git commit -m "
  • Now, You can use cmp command :
git ac "my commit"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment