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