Skip to content

Instantly share code, notes, and snippets.

@waznico
Last active February 19, 2021 20:07
Show Gist options
  • Save waznico/9cf078088067bc881690f1a2fe45e24d to your computer and use it in GitHub Desktop.
Save waznico/9cf078088067bc881690f1a2fe45e24d to your computer and use it in GitHub Desktop.
Git aliases for quicker commit and push
# For Git For Windows use:
[alias]
alias.sacp=!f() { git status && git add . && git status && git commit -m "$1" && git push; }; f
alias.sync=!f() { git pull && git push; }; f
alias.sacs=!f() { git status && git add . && git commit -m "$1" && git pull && git push; }; f
# For git on Mac/Linux use:
[alias]
sacp=!git status && git add . && git status && git commit -m "$1" && git push
sacs=!git status && git add . && git commit -m "$1" && git pull && git push
@waznico
Copy link
Author

waznico commented Feb 16, 2021

I use the commands in my all day development live. Thiese aliases can be stored in the global git config to enable them.

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