Skip to content

Instantly share code, notes, and snippets.

@chiastolite
Created August 26, 2014 03:23
Show Gist options
  • Save chiastolite/80e0d2f0ddd9a770c019 to your computer and use it in GitHub Desktop.
Save chiastolite/80e0d2f0ddd9a770c019 to your computer and use it in GitHub Desktop.
git-wip
#!/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