3 Yann Dirson <ydirson@altern.org>
8 stg-branch - stgdesc:branch[]
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>
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
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
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
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 [-d <desc> | --description=<desc>]::
70 Set the branch description.
72 'stg' branch [-p | --protect]::
73 Protect the named stack or the current one, preventing
74 further StGIT operations from modifying this stack.
76 'stg' branch [-u | --unprotect]::
77 Remove a "protected" flag previously set with '--protect'.
79 'stg' branch --delete::
80 Delete the named <branch>. If there are any patches left in
81 the series, StGIT will refuse to delete it, unless '--force'
84 A protected branch cannot be deleted, it must be unprotected first
87 When the current branch is deleted, the repository HEAD is switched to
88 the "master" branch if it exists.
90 Branch "master" is treated specially (see bug #8732), in that only the
91 StGIT metadata are removed, the GIT branch itself is not destroyed.
97 Force a delete when the series is not empty.
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
114 Part of the StGIT suite - see gitlink:stg[1].