-
Notifications
You must be signed in to change notification settings - Fork 2
Command Line Arguments
(version 0.4.1)
-d, --defaults use default branch names
-f, --force force
Initialize a new git repo with support for the branching model.
Uses remote services: NO.
The initialisation goes through the following steps:
- If the repository is already initialised, exit unless -f is specified.
- If -d is specified, use the well-known branch names and branch name prefixes as defined in GitFlow, otherwise ask the user what names and prefixes to use.
- Use git config to remember the configuration. This means that the configuration is tied to your particular repository instance.
-v, --verbose verbose (more) output, i.e. show more information about the state of the branch, compare it to its merge base, check if it can be rebased etc.
Lists existing features.
Uses remote services: NO.
-F, --fetch fetch from $ORIGIN before performing local operation
Start new feature <name>, optionally basing it on <base> instead of <develop>.
Uses remote services: YES.
This commands involves some Pivotal Tracker API calls. The user is not allowed to create arbitrary branch, he must choose one of the stories that are present in the Pivotal Tracker project assigned to the repository. It goes through following steps:
- Download Current and Backlog from the Pivotal Tracker project assigned to this repository.
- Ask user to choose one of the stories present in Current or Backlog.
- Once a story is picked up, the user is asked to append a human-readable branch description.
- The new branch name is
<feature-prefix>/<story-id>/<description>
. - The story is marked as Started in Pivotal Tracker.
- The branch is created in the repository.
Since this commands ALWAYS connects to Pivotal Tracker, it does not work offline.
-r, --rebase rebase instead of merge
-n, --new-review post a new review for the whole branch, not just the last commit
-R, --no-review do not post any code review request
-P, --no-push do not push the branch upstream
-D, --force-delete force delete the branch once finished
Finish feature <name>.
Uses remote services: YES.
Use this command to finish the story, i.e. mark the branch as finished, mark the story as finished in Pivotal Tracker, post a code review request into Review Board. The whole procedure works in the following way:
- Get the branch name or use the current branch.
- Finish the feature branch, i.e. fetch -> merge -> push (can be modified using the command line options).
- Extract the story id from the branch name.
- Annotate the branch in Git so that we know the story is being finished. Push the notes upstream.
- Call the PT API and mark the story as finished.
- Call the RB API and post a review request unless configured to skip this step.
Since this commands ALWAYS connects to Pivotal Tracker, it does not work offline. It also MAY connect to Review Board and push changes upstream.
Start sharing feature <name> on $ORIGIN.
Uses remote services: YES.
This is roughly equivalent to git push -u $ORIGIN $BRANCH
where BRANCH=<feature-prefix>/<name>
.
Start tracking feature <name> that is shared on $ORIGIN.
Uses remote services: NO.
This is roughly equivalent to git branch -u $ORIGIN/$BRANCH $BRANCH
where BRANCH=<feature-prefix>/<name>
. In the older git (pre-1.8.0), the command is in fact git branch --set-upstream $BRANCH $ORIGIN/$BRANCH
.
Show all changes in <name> that are not in <develop>.
Uses remote services: NO.
This is equivalent to git diff $DEVELOP_BRANCH $BRANCH
where BRANCH=<feature-prefix>/<name>
.
-i do an interactive rebase
Rebase <name> on <develop>
Uses remote services: NO.
Syntactic sugar for git checkout $BRANCH; git rebase -i $DEVELOP_BRANCH
where BRANCH=<feature-prefix>/<name>
.
Switch to feature branch <name>
Uses remote services: NO.
Syntactic sugar for git checkout $BRANCH
where BRANCH=<feature-prefix>/<name>
.
Pull feature <name> from <remote>
Uses remote services: YES.
Syntactic sugar for git pull $REMOTE $BRANCH
where BRANCH=<feature-prefix>/<name>
. It also checks that you are not trying to merge non-matching branches together, an example of which could be:
git flow feature checkout cool-feature
git flow feature pull origin other-cool-feature
That would normally result in merging $REMOTE/other-cool-feature into cool-feature, which you probably don't want, but you need not worry, you are not allowed to do that if you use this tool.
-v verbose (more) output
Lists existing releases
-F fetch from $ORIGIN before performing local operation
Start new release named <version>
Go through Pivotal Tracker and list all stories assigned to the chosen release.
-F fetch from $ORIGIN before performing finish
-s sign the release tag cryptographically
-u use the given GPG-key for the digital signature (implies -s)
-m use the given tag message
-p push to $ORIGIN after performing finish
-k keep branch after performing finish
-n don't tag this release
Finish release <version>
Start sharing release <name> on $ORIGIN
Start tracking release <name> that is shared on $ORIGIN
-v verbose (more) output
Lists existing hotfixes
-F fetch from $ORIGIN before performing local operation
Start new hotfix named <version>, optionally base it on <base> instead of <master>
-F fetch from $ORIGIN before performing finish
-s sign the release tag cryptographically
-u use the given GPG-key for the digital signature (implies -s)
-m use the given tag message
-p push to $ORIGIN after performing finish
-k keep branch after performing finish
-n don't tag this release
Finish hotfix <version>
-v verbose (more) output
Lists existing support branches
-F fetch from $ORIGIN before performing local operation
Start new support branch named <version> based on <base>
A remote repo different from origin can be specified in the config file:
$ git config gitflow.origin myorigin