Stop advertising 'pull' as the only operation blocked on protected stacks.
[stgit/ydirson.git] / Documentation / stg-branch.txt
blob2efe7b1a5eb26fffa32e6cbc6b081224f6a9e917
1 stg-branch(1)
2 =============
3 Yann Dirson <ydirson@altern.org>
4 v0.12.1, April 2007
6 NAME
7 ----
8 stg-branch - stgdesc:branch[]
10 SYNOPSIS
11 --------
12 [verse]
13 'stg' branch
14 'stg' branch <branch>
15 'stg' branch --list
16 'stg' branch --create <newstack> [<commit-id>]
17 'stg' branch --clone [<newstack>]
18 'stg' branch --rename <oldname> <newname>
19 'stg' branch --protect [<branch>]
20 'stg' branch --unprotect [<branch>]
21 'stg' branch --delete [--force] <branch>
22 'stg' branch --convert
24 DESCRIPTION
25 -----------
27 Assorted operations on branches.
29 no command, no argument::
30         Display the name of the current branch.
32 no command, one argument::
33         Switch to the named <branch>.
35 'stg' branch [-l | --list]::
36         Display the list of branches in the current repository,
37         suffixed by the branch description if any, and optionally
38         prefixed by the letter flags 's' if the branch is an StGIT
39         stack, and 'p' if the StGIT stack is protected.  The current
40         branch is shown with a leading ">" character.
42 'stg' branch [-c | --create]::
43         Create a new StGIT stack based at the specified commit, or at
44         the current HEAD if not specified.  The repository HEAD is
45         switched to the new stack.
47 StGIT will try to detect the branch off which the new stack is forked,
48 as well as the remote repository from which that parent branch is
49 taken (if any), so running stglink:pull[] will effectively pull new
50 commits from the correct branch.  It will warn if it cannot guess the
51 parent branch (eg. if you do not specify a branch name as
52 <commit-id>).
54 'stg' branch --clone::
55         Clone the current stack, under the name <newstack> if
56         specified, or using the current stack's name suffixed by a
57         timestamp.
59 The description of the new stack is set to tell it is a clone of the
60 current stack.  The parent information of the new stack is copied from
61 the current stack.
63 Cloning a GIT branch that is not an StGIT stack is similar to creating
64 a new stack off the current branch.
66 'stg' branch [-r | --rename]::
67         Rename the stack named <oldname> to <newname>.
69 'stg' branch [-p | --protect]::
70         Protect the named stack or the current one, preventing
71         further StGIT operations from modifying this stack.
73 'stg' branch [-u | --unprotect]::
74         Remove a "protected" flag previously set with '--protect'.
76 'stg' branch --delete::
77         Delete the named <branch>.  If there are any patches left in
78         the series, StGIT will refuse to delete it, unless '--force'
79         is specified.
81 A protected branch cannot be deleted, it must be unprotected first
82 (see above).
84 When the current branch is deleted, the repository HEAD is switched to
85 the "master" branch if it exists.
87 Branch "master" is treated specially (see bug #8732), in that only the
88 StGIT metadata are removed, the GIT branch itself is not destroyed.
90 'stg' branch --convert::
91         Switch current stack between old and new format.
93 OPTIONS
94 -------
96 --force::
97         Force a delete when the series is not empty.
99 FILES
100 -----
102         $GIT_DIR/patches/<branch>/description
103         $GIT_DIR/patches/<branch>/protected
105 GIT CONFIGURATION VARIABLES
106 ---------------------------
108         branch.<branchname>.remote
109         branch.<branchname>.merge
110         branch.<branchname>.stgit.parentbranch
112 StGIT
113 -----
114 Part of the StGIT suite - see gitlink:stg[1].