|
|
@ -35,7 +35,7 @@ fi
|
|
|
|
echo "Stashing any changes to files..."
|
|
|
|
echo "Stashing any changes to files..."
|
|
|
|
echo "Don't forget to update and push 'master'!"
|
|
|
|
echo "Don't forget to update and push 'master'!"
|
|
|
|
# GOJF Card
|
|
|
|
# GOJF Card
|
|
|
|
git stash
|
|
|
|
[[ $(git stash) != "No local "* ]] && HAS_STASH=1
|
|
|
|
|
|
|
|
|
|
|
|
COMMIT=$( git log --format="%H" -n 1 )
|
|
|
|
COMMIT=$( git log --format="%H" -n 1 )
|
|
|
|
|
|
|
|
|
|
|
@ -46,7 +46,10 @@ git clean -d -f
|
|
|
|
if [[ $BRANCH == "master" ]]; then
|
|
|
|
if [[ $BRANCH == "master" ]]; then
|
|
|
|
|
|
|
|
|
|
|
|
# Don't lose upstream changes!
|
|
|
|
# Don't lose upstream changes!
|
|
|
|
mfup
|
|
|
|
git fetch upstream
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Rebase onto latest master
|
|
|
|
|
|
|
|
if git rebase upstream/master; then
|
|
|
|
|
|
|
|
|
|
|
|
# Allow working directly with the main fork
|
|
|
|
# Allow working directly with the main fork
|
|
|
|
echo
|
|
|
|
echo
|
|
|
@ -57,6 +60,13 @@ if [[ $BRANCH == "master" ]]; then
|
|
|
|
echo -n "Pushing to upstream/master... "
|
|
|
|
echo -n "Pushing to upstream/master... "
|
|
|
|
git push -f upstream
|
|
|
|
git push -f upstream
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
echo "Merge conflicts? Stopping here."
|
|
|
|
|
|
|
|
exit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
else
|
|
|
|
else
|
|
|
|
|
|
|
|
|
|
|
|
if [ -z "$(git branch -vv | grep ^\* | grep \\[origin)" ]; then
|
|
|
|
if [ -z "$(git branch -vv | grep ^\* | grep \\[origin)" ]; then
|
|
|
@ -114,6 +124,4 @@ rm -rf ${TMPFOLDER}
|
|
|
|
# Go back to the branch we started from
|
|
|
|
# Go back to the branch we started from
|
|
|
|
git checkout $BRANCH
|
|
|
|
git checkout $BRANCH
|
|
|
|
|
|
|
|
|
|
|
|
if [[ $BRANCH != "master" ]]; then
|
|
|
|
[[ $HAS_STASH == 1 ]] && git stash pop
|
|
|
|
git stash pop
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|