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