blob: ccc99bebfa1435a6cc5e924b11612dcd82e3344b [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() {
21 # TODO: Implement the optional base argument
22 FEATURE="$1"
23 BASE="develop"
24 if [ "$FEATURE" = "" ]; then
25 echo "Missing argument <release>."
26 usage
27 exit 1
28 fi
29}
30
31start() {
32 # TODO
33 parse_args "$@"
34 gitflow_check_clean_working_tree
35 echo "git checkout -b $FEATURE $BASE"
36}
37
38finish() {
39 # TODO
40 parse_args "$@"
41 gitflow_check_clean_working_tree
42 echo "git checkout $BASE"
43 echo "git merge --no-ff $FEATURE"
44}
45