Last active
December 15, 2015 19:49
-
-
Save calebhearth/5314351 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
#!/usr/bin/env bash | |
branch_pattern="^## (.*)$" | |
git_status=`git status -sb` | |
if [[ $git_status =~ $branch_pattern ]] | |
then | |
echo ${BASH_REMATCH[1]} | |
fi |
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
#!/usr/bin/env zsh | |
successfully() { | |
$* || (echo "failed" 1>&2 && exit 1) | |
} | |
successfully git fetch | |
successfully git rebase -i origin/master | |
successfully git push -f | |
successfully git checkout master | |
successfully git merge `git current-branch` | |
successfully git push | |
successfully git push origin --delete `git current-branch` | |
successfully git branch -d `git current-branch` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment