public
Last active

Add, commit and push function.

  • Download Gist
.bash_profile
Shell
1 2 3 4 5 6 7 8 9 10 11 12 13
/*
* 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 */
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.