Created
December 13, 2018 14:03
-
-
Save ilhnctn/4b108ce63bec991a6fba8c6a95ba4966 to your computer and use it in GitHub Desktop.
fetches master and merge into the branch passed as parameter
This file contains 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
master_merge(){ | |
TARGET_BRANCH = $1 | |
if [[ $# -eq 0 ]] ; then | |
echo "\033[41;37;1m Usage: mm name_of_branch !!! \033[0m" | |
exit(1) | |
fi | |
echo "\033[41;37;1m Fetch/pull master and merge into $TARGET_BRANCH !!! \033[0m" | |
git checkout master | |
git pull | |
git checkout $TARGET_BRANCH | |
echo "\033[41;37;1m Fetched master and merged into $TARGET_BRANCH \033[0m" | |
git status | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment