GIT-PHAB(1) | GIT-PHAB(1) |
git-phab - Git subcommand to integrate with phabricator.
git phab attach [-h] [--reviewers <username1,#project2,...>]
[--cc <username1,#project2,...>] [--message <message>]
[--task <T123>] [--remote <remote>] [--assume-yes]
[--projects <project1,project2,...>]
[<revision range>] git phab log [-h] [<revision range>] git phab fetch [-h] [<T123>] git phab apply [-h] [<(T|D)123>] [-n] [-o <directory>] git phab browse [-h] [objects [objects ...]] git phab clean [-h] git phab land [-h] [--no-push]
Provides integration for projects using Phabricator.
The current repository must contain a valid .arcconfig file and a remote location to push submitted branches must be defined using:
git config phab.remote <remote>
attach
<revision_range> can be either a range of commits or a single commit, as understood by git rev-parse. If omitted, the default range is from the remote current branch’s remote tracking commit to HEAD.
With --task option, or if current branch is in the form Txxx-description, it will also push the current HEAD into wip/phab/Txxx-description on the configured remote repository. If the phabricator instance supports the std:maniphest:git:uri-branch extention, the remote branch URI will be linked on the Maniphest.
If not task is defined, it will prompt if a new one should be created.
If a task is defined but the current branch is not in the form Txxx-description, it will prompt if a new branch must be created using current branch’s name prefixed with Txxx-.
log
fetch
This only fetch and print the commit id, it won’t create or checkout a branch. A new branch can then be created using, for example:
git checkout -b my-branch FETCH_HEAD
With --checkout (or -c), fetch and checkout in a branch.
apply
With --no-dependencies (or -n), revision’s dependencies will not be applied.
With --output-directory (or -o), patches aren’t applied to the repository, but exported to a directory instead.
browse
With no argument, if the current branch is in the form Txxx-description, opens that Maniphest task.
If objects is in the form Dxxx/Txxx it will open the corresponding Differential/Maniphest. Otherwise it is assumed that object is a commit as understood by git rev-parse and if that commit contains a link to a Differential it will be open.
clean
land
For each related tasks, also prompt if it should be closed.
Attach all commits since origin/master
$ git phab attach
Attach only the top commit
$ git phab attach HEAD
Attach all commits since origin/master, excluding top commit
$ git phab attach origin/master..HEAD^
Attach top 3 patches, link them to a task, and set reviewers
$ git phab attach --reviewers xclaesse,smcv --task T123 HEAD~3..
Push current branch to origin/wip/phab/T123
$ git config phab.remote origin $ git phab attach --task T123
Fetch a branch associated with the task T123
$ git phab fetch T123
06/19/2017 |