Skip to content

Instantly share code, notes, and snippets.

@mattimustang
Created April 6, 2017 03:35
Show Gist options
  • Save mattimustang/58c72e2f730ba3a2630ee7a60e58c40a to your computer and use it in GitHub Desktop.
Save mattimustang/58c72e2f730ba3a2630ee7a60e58c40a to your computer and use it in GitHub Desktop.
#!/bin/sh
FEATURE="$1"
if [ -z ${FEATURE} ]; then
echo "usage: $0 <feature branch>" >&2
exit 2
fi
git checkout develop
if [ $? -ne 0 ]; then
exit 1
fi
git merge --no-ff ${FEATURE}
if [ $? -ne 0 ]; then
exit 1
fi
git push origin develop
if [ $? -ne 0 ]; then
exit 1
fi
git checkout master
if [ $? -ne 0 ]; then
exit 1
fi
git merge --no-ff develop
if [ $? -ne 0 ]; then
exit 1
fi
git push origin master
if [ $? -ne 0 ]; then
exit 1
fi
git branch -d ${FEATURE}
if [ $? -ne 0 ]; then
exit 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment