Skip to content

Instantly share code, notes, and snippets.

@itsjoekent
Created July 14, 2015 15:06
Show Gist options
  • Save itsjoekent/51fcca95cc076e9fd2dc to your computer and use it in GitHub Desktop.
Save itsjoekent/51fcca95cc076e9fd2dc to your computer and use it in GitHub Desktop.
Update dosomething repo
git checkout dev;
git fetch upstream;
git rebase upstream/dev;
git push origin dev;
NewBranch () {
read -p "Do you wish to checkout a new branch? " yn
case $yn in
[Yy]* ) echo "Type in the issue #"; read issue_number; git checkout -b $issue_number; break;;
[Nn]* ) ExistingBranch; break;;
* ) echo "Y or N";;
esac
}
ExistingBranch () {
read -p "Do you wish to checkout an existing branch? " yn
case $yn in
[Yy]* ) echo "Type in the issue #"; read issue_number; git checkout $issue_number; break;;
[Nn]* ) exit;;
* ) echo "Y or N";;
esac
}
NewBranch;
echo "Mission complete"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment