Created
October 9, 2017 10:18
-
-
Save apahim/80487e951c71f3acb3632a375b30b69b to your computer and use it in GitHub Desktop.
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 | |
if [ -z "${1}" ] | |
then | |
echo "Please provide usernam:branch of your fork." | |
exit 1 | |
else | |
fork_user=$(echo ${1} | cut -d ":" -f 1) | |
fork_branch=$(echo ${1} | cut -d ":" -f 2) | |
fi | |
if [ -z $fork_user -o -z fork_branch ] | |
then | |
echo "Please provide usernam:branch of your fork." | |
else | |
git checkout master | |
git pull upstream master | |
git merge -S --no-ff $fork_user-$fork_branch -m "Merge branch '$fork_user-$fork_branch'" -m "Signed-off-by: $(git config --get user.name) <$(git config --get user.email)>" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment