git-feature - Create a feature branch from the "current release"
This documentation refers to git-feature version 1.0.6
git-feature [option] branch-name git-feature [option] [--jira|-j] JIRAID OPTIONS: branch-name The name of the new branch to create from the current release branch/tag -j --jira[=]JIRAID Find the summary for JIRA item JIRAID and make it the branch name for the feature. -u --url[=]URL Use URL as the JIRA instance for looking up summaries. -U --user[=]str JIRA user name to use when querying JIRA -P --password[=]str JIRA password for --user -t --tag[=]str Specify a tag that any branch with newer commits must contain -b --branch[=]str Similarly a branch that other branches with newer commits must contain (Default origin/master) -l --local Shorthand for --branch '^master$' -p --push Push the new brach upstream --no-fetch Don't fetch before trying to find the remote branch -n --new-pom Set the pom.xml version to the next available version -x --pom[=]dir/pom.xml The location of the master pom.xml if it isn't in the current directory. -t --test Test, don't actually run -v --verbose Show more details --version Prints the version information --help Prints this help information --man Prints the full documentation for git-feature
The git feature command allows a simplified way to create and switch to feature branches using whatever you define as the current release.
git feature
By default current release is defined as the origin/master branch that can be changed either on the command line using the --tag or --branch arguments or by setting the workflow.prod git config. Example of commonly used alternatives include using release version tags where you might use something like --tag ^v\d+[.]\d+' to match tags like v0.1 or v1.0 etc. Other examples include different branches containing release versions of code.
workflow.prod
--tag ^v\d+[.]\d+'
The branch origin/master is used over master to save you from having to switch to master and pull any new changes. A git fetch is called by default before branching to further ensure the latest version of code is available.
git fetch
Defaults for this script can be set through git config
git config
workflow.prod Sets how a prod release is determined eg the default equivalent is branch=^origin/master$ workflow.pom The default location for the pom.xml file (used by C<--new-pom> when updating pom.xml for the new branch) workflow.pom-local Can set default value of C<--local> jira.url Specifies the URL for the JIRA instance being used
You can set these values either by editing the repository local .git/config file or ~/.gitconfig or use the git config command
.git/config
~/.gitconfig
# eg Setting the global value git config --global workflow.prod 'branch=^origin/master$' # or set a repository's local value git config workflow.prod 'tag=^release_\d{4}_\d{2}\d{2}$' # or setting pom.xml location to a sub directory git config workflow.pom 'somedir/pom.xml'
There are no known bugs in this module.
Please report problems to Ivan Wills (ivan.wills@gmail.com).
Patches are welcome.
Ivan Wills - (ivan.wills@gmail.com)
Copyright (c) 2014 Ivan Wills (14 Mullion Close, Hornsby Heights, NSW Australia 2077). All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
To install App::Git::Workflow, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::Git::Workflow
CPAN shell
perl -MCPAN -e shell install App::Git::Workflow
For more information on module installation, please visit the detailed CPAN module installation guide.