Created
August 26, 2014 03:23
-
-
Save chiastolite/80e0d2f0ddd9a770c019 to your computer and use it in GitHub Desktop.
git-wip
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/sh | |
if ! hash hub 2>/dev/null; then | |
echo 'command not found: hub' | |
echo '' | |
echo 'hub is needed for create pull-request.' | |
echo '' | |
echo 'see: https://github.com/github/hub' | |
exit 1 | |
fi | |
git checkout -b $@ | |
git commit --allow-empty | |
WIP_TARGET=`git config --get wip.target` | |
if test "$WIP_TARGET" = "" ;then | |
WIP_TARGET=master | |
fi | |
git pull-request -b $WIP_TARGET |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment