git-feature
- Create/Merge feature branch
git-feature
[-a|--alias branch_prefix] [-s|--separator branch_separator] [-r|--remote [remote_name]] <name>
git-feature
[-a|--alias branch_prefix] [-s|--separator branch_separator] finish [--squash] <name>
Create/Merge the given feature branch.
The branch name
may be specified as multiple words which will be joined with -
characters. If any word should start with a -
, the name should be preceded by --
, which will signal that option parsing should be ignored.
<-a|--alias branch_prefix>
The branch prefix to use, or feature
if not supplied.
<-s|--separator branch_separator>
The separator to use for joining the branch prefix and the branch name, or /
if not supplied.
<-r|--remote [remote_name]>
Setup a remote tracking branch using remote_name
. If remote_name
is not supplied, use origin
by default.
<--from [start_point]>
Setup a start point when the branch created. If --from
is not supplied, use the current branch by default.
<finish>
Merge and delete the feature branch.
<--squash>
Run a squash merge.
<name>
The name of the feature branch.
You can configure the default branch prefix and separator via git config options.
$ git config --global add git-extras.feature.prefix "branch_prefix"
The default branch_prefix
is feature
.
$ git config --global add git-extras.feature.separator "-"
The default branch_separator
is /
.
$ git feature dependencies
...
$ (feature/dependencies) git commit -m "Some changes"
$ (feature/dependencies) git checkout master
$ git feature finish dependencies
$ (feature/dependencies) git checkout master
$ git feature finish --squash dependencies
$ git feature dependencies -r upstream
$ git alias features "feature -a features"
$ git features dependencies
$ (features/dependencies) ...
$ (features/dependencies) git checkout master
$ git features finish dependencies
$ git feature -s - dependencies
$ (feature-dependencies) ...
$ (feature-dependencies) git checkout master
$ git feature -s - finish dependencies
$ git config --global --add git-extras.feature.prefix "features"
$ git config --global --add git-extras.feature.separator "."
$ git feature dependency tracking
$ (features.dependency-tracking) ...
$ (features.dependency-tracking) git checkout master
$ git feature finish dependency tracking
git-feature
option flag as part of a branch name:$ git feature -- --remote
...
$ (feature/--remote) git commit -m "Some changes"
Written by Jesús Espino <jespinog@gmail.com>
Modified by Mark Pitman <mark.pitman@gmail.com>
Modified by Carlos Prado <carlos.prado@cpradog.com>
Modified by Austin Ziegler <halostatue@gmail.com>
<https://github.com/tj/git-extras/issues>
<https://github.com/tj/git-extras>