Skip to content

Instantly share code, notes, and snippets.

@aileron
Last active October 6, 2017 08:06
Show Gist options
  • Save aileron/4b7fc5319ad06ee0343bfb4f694f15d3 to your computer and use it in GitHub Desktop.
Save aileron/4b7fc5319ad06ee0343bfb4f694f15d3 to your computer and use it in GitHub Desktop.
github wip flow
#!/bin/sh
if [ $# -eq 0 ]; then
echo "Usage:"
echo "git wip (branch-name) (issue-number)"
exit 2
fi
issue_number=''
branch_name=$1
if [ $# -eq 2 ]; then
branch_name="#$2_$1"
issue_number="#$2"
fi
git pull origin develop
git checkout -b $branch_name
git commit --allow-empty -m "$issue_number[ci skip][init]"
git push origin $branch_name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment