'\" t .\" Title: stg-branch .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: 03/26/2014 .\" Manual: StGit Manual .\" Source: StGit .\" Language: English .\" .TH "STG\-BRANCH" "1" "03/26/2014" "StGit" "StGit Manual" .\" ----------------------------------------------------------------- .\" * 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" stg-branch \- Branch operations: switch, list, create, rename, delete, \&.\&.\&. .SH "SYNOPSIS" .sp .nf \fIstg\fR branch \fIstg\fR branch [\-\-merge] [\-\-] \fIstg\fR branch \-\-list \fIstg\fR branch \-\-create [\-\-] [] \fIstg\fR branch \-\-clone [\-\-] [] \fIstg\fR branch \-\-rename [\-\-] \fIstg\fR branch \-\-protect [\-\-] [] \fIstg\fR branch \-\-unprotect [\-\-] [] \fIstg\fR branch \-\-delete [\-\-force] [\-\-] \fIstg\fR branch \-\-cleanup [\-\-force] [\-\-] [] \fIstg\fR branch \-\-description= [\-\-] [] .fi .SH "DESCRIPTION" Create, clone, switch between, rename, or delete development branches within a git repository\&. .PP \fIstg branch\fR .RS 4 Display the name of the current branch\&. .RE .PP \fIstg branch\fR .RS 4 Switch to the given branch\&. .RE .SH "OPTIONS" .PP \-l, \-\-list .RS 4 List each branch in the current repository, followed by its branch description (if any)\&. The current branch is prefixed with \fI>\fR\&. Branches that have been initialized for StGit (with \fBstg-init\fR(1)) are prefixed with \fIs\fR\&. Protected branches are prefixed with \fIp\fR\&. .RE .PP \-c, \-\-create .RS 4 Create (and switch to) a new branch\&. The new branch is already initialized as an StGit patch stack, so you do not have to run \fBstg-init\fR(1) manually\&. If you give a committish argument, the new branch is based there; otherwise, it is based at the current HEAD\&. StGit will try to detect the branch off of which the new branch is forked, as well as the remote repository from which that parent branch is taken (if any), so that running \fBstg-pull\fR(1) will automatically pull new commits from the correct branch\&. It will warn if it cannot guess the parent branch (e\&.g\&. if you do not specify a branch name as committish)\&. .RE .PP \-\-clone .RS 4 Clone the current branch, under the name if specified, or using the current branch\(cqs name plus a timestamp\&. The description of the new branch is set to tell it is a clone of the current branch\&. The parent information of the new branch is copied from the current branch\&. .RE .PP \-r, \-\-rename .RS 4 Rename an existing branch\&. .RE .PP \-p, \-\-protect .RS 4 Prevent StGit from modifying a branch \(em either the current one, or one named on the command line\&. .RE .PP \-u, \-\-unprotect .RS 4 Allow StGit to modify a branch \(em either the current one, or one named on the command line\&. This undoes the effect of an earlier \fIstg branch \-\-protect\fR command\&. .RE .PP \-\-delete .RS 4 Delete the named branch\&. If there are any patches left in the branch, StGit will refuse to delete it unless you give the \fI\-\-force\fR flag\&. A protected branch cannot be deleted; it must be unprotected first (see \fI\-\-unprotect\fR above)\&. If you delete the current branch, you are switched to the "master" branch, if it exists\&. .RE .PP \-\-cleanup .RS 4 Remove the StGit information for the current or given branch\&. If there are patches left in the branch, StGit refuses the operation unless \fI\-\-force\fR is given\&. A protected branch cannot be cleaned up; it must be unprotected first (see \fI\-\-unprotect\fR above)\&. A cleaned up branch can be re\-initialised using the \fIstg init\fR command\&. .RE .PP \-d DESCRIPTION, \-\-description DESCRIPTION .RS 4 Set the branch description\&. .RE .PP \-\-merge .RS 4 Merge work tree changes into the other branch\&. .RE .PP \-\-force .RS 4 Force a delete when the series is not empty\&. .RE .SH "STGIT" Part of the StGit suite \- see \fBstg\fR(1)