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