Skip to content

Instantly share code, notes, and snippets.

@serrodcal
Created August 19, 2024 10:40
Show Gist options
  • Save serrodcal/af8126a2c2d467ee78b1b8ec99efb11e to your computer and use it in GitHub Desktop.
Save serrodcal/af8126a2c2d467ee78b1b8ec99efb11e to your computer and use it in GitHub Desktop.

Alias for git add, git commit and git push

Add & commit

git config --global alias.ac "!git add -A && git commit -m "

git ac "my commit"

Add, commit & push

git config --global alias.cmp '!f() { git add -A && git commit -m "$@" && git push; }; f'

git cmp "my commit"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment