| #!/bin/sh |
| # |
| # gitflow -- A collection of Git wrapper scripts to provide high-level |
| # repository operations for Vincent Driessen's branching model: |
| # |
| # Original blog post presenting this model is found at: |
| # http://nvie.com/archives/323 |
| # |
| # Feel free to contribute to this project at: |
| # http://github.com/nvie/gitflow |
| # |
| # Copyright (c) 2010 by Vincent Driessen |
| # |
| |
| usage() { |
| echo "usage: gitflow start feature <name> [<base>]" |
| echo " gitflow finish feature <name>" |
| } |
| |
| parse_args() { |
| FEATURE="$1" |
| if [ $# -eq 2 ]; then |
| BASE="$2" |
| else |
| BASE="develop" |
| fi |
| if [ "$FEATURE" = "" ]; then |
| echo "Missing argument <release>." |
| usage |
| exit 1 |
| fi |
| } |
| |
| start() { |
| # TODO |
| parse_args "$@" |
| gitflow_check_clean_working_tree |
| echo "git checkout -b $FEATURE $BASE" |
| } |
| |
| finish() { |
| # TODO |
| parse_args "$@" |
| gitflow_check_clean_working_tree |
| echo "git checkout $BASE" |
| echo "git merge --no-ff $FEATURE" |
| } |
| |