Last active
December 13, 2015 22:19
-
-
Save andrewhathaway/4983844 to your computer and use it in GitHub Desktop.
Add, commit and push function.
This file contains hidden or 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
/* | |
* Commit And Push - CAP. | |
* Cap function to add, commit and push. | |
* Drop this in ~/.bash_profile | |
* Usage - cap 'commit message' | |
* - Andrew Hathaway | |
*/ | |
cap() { | |
git add . ; /* Add all changes */ | |
git commit -m "$1"; /* Commit the changes with the message */ | |
git pull; git push; /* Pull first, then push */ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment