'\" t .\" Title: git-phab .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: 03/21/2017 .\" Manual: \ \& .\" Source: \ \& .\" Language: English .\" .TH "GIT\-PHAB" "1" "03/21/2017" "\ \&" "\ \&" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" git-phab \- Git subcommand to integrate with phabricator\&. .SH "SYNOPSIS" .sp .nf \fBgit phab attach\fR [\-h] [\-\-reviewers \fI\fR] [\-\-cc \fI\fR] [\-\-message \fI\fR] [\-\-task \fI\fR] [\-\-remote ] [\-\-assume\-yes] [\-\-projects \fI\fR] [\fI\fR] \fBgit phab log\fR [\-h] [] \fBgit phab fetch\fR [\-h] [\fI\fR] \fBgit phab apply\fR [\-h] [\fI<(T|D)123>\fR] [\-n] [\-o \fI\fR] \fBgit phab checkout\fR [\-h] [\fI\fR] \fBgit phab browse\fR [\-h] [\fIobjects\fR [\fIobjects\fR \&...]] \fBgit phab clean\fR [\-h] \fBgit phab land\fR [\-h] [\-\-no\-push] .fi .SH "DESCRIPTION" .sp Provides integration for projects using Phabricator\&. .sp The current repository must contain a valid \&.arcconfig file and a remote location to push submitted branches must be defined using: .sp .if n \{\ .RS 4 .\} .nf git config phab\&.remote .fi .if n \{\ .RE .\} .SH "COMMANDS" .PP \fBattach\fR .RS 4 Creates a new differential for each commit in the provided \fI\fR\&. Commit messages will be rewritten to include the URL of the newly created Differential (no other information will be added to the message)\&. If a commit message already contains the URL of a Differential it will be updated instead of creating a new one\&. .sp \fI\fR 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\(cqs remote tracking commit to HEAD\&. .sp 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\&. .sp If not task is defined, it will prompt if a new one should be created\&. .sp 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\(cqs name prefixed with Txxx\-\&. .RE .PP \fBlog\fR .RS 4 Prints all commits in the provided \&. For each commit it displays the Differential ID and its current status\&. See the \fIattach\fR command for details on how \fI\fR is formed\&. .RE .PP \fBfetch\fR .RS 4 Fetch the branch linked to a Maniphest task\&. With no argument the task will be defined from the current branch name, if it is in the form Txxx\-description\&. .sp This only fetch and print the commit id, it won\(cqt create or checkout a branch\&. A new branch can then be created using, for example: .sp .if n \{\ .RS 4 .\} .nf git checkout \-b my\-branch FETCH_HEAD .fi .if n \{\ .RE .\} .RE .sp See also \fBcheckout\fR command\&. .PP \fBapply\fR .RS 4 Apply a revision and its dependencies\&. .sp With \-\-no\-dependencies (or \-n), revision\(cqs dependencies will not be applied\&. .sp With \-\-output\-directory (or \-n), patches aren\(cqt applied to the repository, but exported to a directory instead\&. .RE .PP \fBcheckout\fR .RS 4 Same as \fBfetch\fR but also create a new branch and check it out\&. If an existing branch is found for the same task it will prompt to reset that branch to the newly fetched commit, then checkout is as well\&. .RE .PP \fBbrowse\fR .RS 4 Open related URIs in a web browser using \fBxdg\-open\fR\&. .sp With no argument, if the current branch is in the form Txxx\-description, opens that Maniphest task\&. .sp If objects is in the form \fIDxxx\fR/\fITxxx\fR 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\&. .RE .PP \fBclean\fR .RS 4 For all local and remote references, if they are in the form Txxx\-description and the corresponding task has been closed, prompt if that branch should be removed\&. .RE .PP \fBland\fR .RS 4 Same as git push but for each commit that would be pushed, query who approved its differential and add corresponding \fIReviewed\-by:\fR line\&. Note that the email address is guessed by looking the reviewer\(cqs fullname into git shortlog\&. If the fullname cannot be found it will be asked then stored into ~/\&.config/git/phab so it won\(cqt be prompted again\&. .sp For each related tasks, also prompt if it should be closed\&. .RE .SH "EXAMPLES" .sp Attach all commits since origin/master .sp .if n \{\ .RS 4 .\} .nf $ git phab attach .fi .if n \{\ .RE .\} .sp Attach only the top commit .sp .if n \{\ .RS 4 .\} .nf $ git phab attach HEAD .fi .if n \{\ .RE .\} .sp Attach all commits since origin/master, excluding top commit .sp .if n \{\ .RS 4 .\} .nf $ git phab attach origin/master\&.\&.HEAD^ .fi .if n \{\ .RE .\} .sp Attach top 3 patches, link them to a task, and set reviewers .sp .if n \{\ .RS 4 .\} .nf $ git phab attach \-\-reviewers xclaesse,smcv \-\-task T123 HEAD~3\&.\&. .fi .if n \{\ .RE .\} .sp Push current branch to origin/wip/phab/T123 .sp .if n \{\ .RS 4 .\} .nf $ git config phab\&.remote origin $ git phab attach \-\-task T123 .fi .if n \{\ .RE .\} .sp Fetch a branch associated with the task T123 .sp .if n \{\ .RS 4 .\} .nf $ git phab fetch T123 .fi .if n \{\ .RE .\}