Skip to content

Commit

Permalink
Added 'feature checkout' subcommand.
Browse files Browse the repository at this point in the history
This can be used as a shortcut to "git checkout feature/full-feature-name".
Feature branch prefix names may be used for convenience.
  • Loading branch information
nvie committed May 27, 2010
1 parent c118a85 commit d43ab84
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions git-flow-feature
Expand Up @@ -49,6 +49,7 @@ usage() {
echo " git flow feature track <name>"
echo " git flow feature diff [<name|nameprefix>]"
echo " git flow feature rebase [-i] [<name|nameprefix>]"
echo " git flow feature checkout [<name|nameprefix>]"
}

cmd_default() {
Expand Down Expand Up @@ -389,6 +390,17 @@ cmd_diff() {
fi
}

cmd_checkout() {
parse_args "$@"

if [ "$NAME" != "" ]; then
expand_nameprefix_arg
git checkout "$BRANCH"
else
die "Name a feature branch explicitly."
fi
}

cmd_rebase() {
DEFINE_boolean interactive false 'do an interactive rebase' i
parse_args "$@"
Expand Down

0 comments on commit d43ab84

Please sign in to comment.