blob: 6551b996578370e8f21f40cca9687635efabe458 [file] [log] [blame]
Vincent Driessenf7f687c2010-01-21 01:32:18 +01001#!/bin/sh
Vincent Driessen093a1472010-01-21 01:36:44 +01002#
3# gitflow -- A collection of Git wrapper scripts to provide high-level
4# repository operations for Vincent Driessen's branching model:
5#
6# Original blog post presenting this model is found at:
7# http://nvie.com/archives/323
8#
9# Feel free to contribute to this project at:
10# http://github.com/nvie/gitflow
11#
12# Copyright (c) 2010 by Vincent Driessen
13#
Vincent Driessenf7f687c2010-01-21 01:32:18 +010014
15usage() {
16 echo "usage: gitflow start feature <name> [<base>]"
17 echo " gitflow finish feature <name>"
18}
19
20parse_args() {
Vincent Driessenf7f687c2010-01-21 01:32:18 +010021 FEATURE="$1"
Daniel Truemper21c34832010-01-24 12:11:15 +010022 if [ $# -eq 2 ]; then
23 BASE="$2"
24 else
25 BASE="develop"
26 fi
Vincent Driessenf7f687c2010-01-21 01:32:18 +010027 if [ "$FEATURE" = "" ]; then
28 echo "Missing argument <release>."
29 usage
30 exit 1
31 fi
32}
33
34start() {
35 # TODO
36 parse_args "$@"
37 gitflow_check_clean_working_tree
38 echo "git checkout -b $FEATURE $BASE"
39}
40
41finish() {
42 # TODO
43 parse_args "$@"
44 gitflow_check_clean_working_tree
45 echo "git checkout $BASE"
46 echo "git merge --no-ff $FEATURE"
47}
48