Last active
September 26, 2017 17:48
-
-
Save aalonzolu/6550e64173297a407056445e2427d5e6 to your computer and use it in GitHub Desktop.
gitpush function, send to git in one line.
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
#INSTALL | |
#Put this function on your .bashrc or /etc/profile or .profile (in macOS) | |
#USAGE | |
# gitpush <branch> "commit comment" | |
gitpush(){ | |
if [[ $# -eq 0 ]] ; then | |
echo "arguments needed"; | |
fi | |
if [[ $# -eq 2 ]] ; then | |
git pull origin $1 --no-edit ; | |
git add .; | |
git commit -m "$2"; | |
git push origin $1; | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment