Last active

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

Add, commit and push function.

View .bash_profile
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 */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.