Skip to content

Instantly share code, notes, and snippets.

@sethdavis512
Last active March 15, 2019 16:55
Show Gist options
  • Save sethdavis512/781276c3913b5d3d0149f1392ddfe126 to your computer and use it in GitHub Desktop.
Save sethdavis512/781276c3913b5d3d0149f1392ddfe126 to your computer and use it in GitHub Desktop.
# VARIABLES ==========
defaultCommitMessage="Add all changed files."
# FUNCTIONS ==========
gitAddAllAndCommit() {
git add . && git commit -m "${1:-defaultCommitMessage}"
}
gitAddAllCommitAndPush() {
git add . && git commit -m "${1:-defaultCommitMessage}" && git push
}
gitCommit() {
git commit -m "${1:-defaultCommitMessage}"
}
# ALIAS ==========
alias ga="git add ."
alias gac="gitAddAllAndCommit"
alias gacp="gitAddAllCommitAndPush"
alias gc="gitCommit"
alias gs="git status"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment