Last active
October 18, 2015 14:21
-
-
Save SauloSilva/11216740 to your computer and use it in GitHub Desktop.
git pc
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
#!/bin/bash | |
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD) | |
COMMIT_MESSAGE=$1 | |
echo -e "$(tput setaf 2)** Executing Status command$(tput sgr0)" | |
git status | |
echo -e "\n$(tput setaf 2)\n** Executing add command$(tput sgr0)" | |
git add . | |
echo -e "$(tput setaf 2)\n** Executing commit command$(tput sgr0)\n" | |
git commit -a -m"[$CURRENT_BRANCH] $COMMIT_MESSAGE" | |
echo -e "$(tput setaf 2)\n** Executing push command$(tput sgr0)\n\n" | |
git push origin $CURRENT_BRANCH |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Creating
Usage
git pc 'message'