Created
May 20, 2015 10:21
-
-
Save greenimpala/7a683f5d008b6be7be7c to your computer and use it in GitHub Desktop.
git commit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Quick function that adds all unstaged / untracked files to the working tree. | |
# Applies a commit message by joining all the shell arguments and then pushes it to origin. | |
# | |
# Usage: `commit My first commit` | |
commit() { | |
git add -A | |
git commit -am "$*" | |
# Do not override users push settings | |
original_push_setting=`git config --global push.default` | |
git config --global push.default current | |
git push origin | |
git config --global push.default $original_push_setting | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment