-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgit-folder.1
More file actions
136 lines (135 loc) · 3.58 KB
/
Copy pathgit-folder.1
File metadata and controls
136 lines (135 loc) · 3.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
.\" Automatically generated by Pandoc 3.9.0.2
.\"
.TH "GIT\-FOLDER" "1" "2026\-04\-09" "Git Manual"
.SH NAME
git\-folder \- manage groups of git branches as folders
.SH SYNOPSIS
.IP
.EX
git folder list <folder>
git folder increment [<folder>]
git folder squash
git folder delete [\-\-force] <folder>
git folder delete\-upto [\-\-force] <folder> <n>
git folder rename [\-\-force] <old> <new>
git folder max branch <folder>
git folder max number <folder>
.EE
.SH DESCRIPTION
\f[B]git\-folder\f[R] manages groups of related branches under a common
prefix, like \f[CR]a/1\f[R], \f[CR]a/2\f[R], \f[CR]a/3\f[R], etc.
.SH HIGH\-LEVEL COMMANDS (PORCELAIN)
.TP
\f[B]list\f[R] \f[I]<folder>\f[R]
List all branches in the folder.
.TP
\f[B]increment\f[R] \f[I][folder]\f[R]
Create and checkout the next numbered branch.
If \f[I]folder\f[R] is omitted, defaults to the folder of the current
branch.
Errors if the current branch is not the max branch in the folder.
If \f[I]folder\f[R] is specified, creates from the max branch regardless
of current branch.
.TP
\f[B]squash\f[R]
When called with the max branch in a folder checked out, creates the
next numbered branch and squashes all commits since the divergence from
the trunk branch (main/master) into one commit.
Detects the trunk branch automatically.
Errors if the current branch is not a folder branch or not the max
branch.
.TP
\f[B]delete\f[R] \f[I]<folder>\f[R]
Delete all branches in the folder.
Prompts for confirmation unless \f[CR]\-\-force\f[R] is set.
.TP
\f[B]delete\-upto\f[R] \f[I]<folder>\f[R] \f[I]<n>\f[R]
Delete all numeric branches in the folder with suffix less than
\f[I]n\f[R].
Non\-numeric branches (e.g.\ \f[CR]async/temp\f[R]) are preserved.
Prompts for confirmation unless \f[CR]\-\-force\f[R] is set.
.TP
\f[B]rename\f[R] \f[I]<old>\f[R] \f[I]<new>\f[R]
Rename all branches from prefix \f[I]old\f[R] to \f[I]new\f[R].
Prompts for confirmation unless \f[CR]\-\-force\f[R] is set.
.SH LOW\-LEVEL COMMANDS (PLUMBING)
.TP
\f[B]max branch\f[R] \f[I]<folder>\f[R]
Print the full name of the max branch in the folder
(e.g.\ \f[CR]async/4\f[R]).
.TP
\f[B]max number\f[R] \f[I]<folder>\f[R]
Print the numeric suffix of the max branch in the folder
(e.g.\ \f[CR]4\f[R]).
.SH OPTIONS
.TP
\f[B]\(enforce\f[R], \f[B]\-f\f[R]
Skip confirmation prompts.
For \f[B]delete\f[R], also allows deleting the currently checked\-out
branch by detaching HEAD first.
.SH NOTES
When \f[I][folder]\f[R] is omitted, the folder is inferred from the
current branch name by taking the substring before the first
\f[CR]/\f[R].
If the current branch contains no \f[CR]/\f[R], the command fails.
.PP
Numeric branch suffixes may be integers or decimals (e.g.\ \f[CR]2\f[R],
\f[CR]2.5\f[R]).
Non\-numeric suffixes (e.g.\ \f[CR]temp\f[R], \f[CR]bigbooty\f[R]) are
treated as opaque and ignored by \f[B]increment\f[R] and
\f[B]delete\-upto\f[R].
.SH COMPLETION
zsh completion is available via:
.IP
.EX
git folder completion > \(ti/.zsh/completions/_git\-folder
.EE
.SH EXAMPLES
Start a numbered branch sequence:
.IP
.EX
$ git checkout \-b async/1
$ # ... make 7 commits ...
$ git folder increment
creating async/2
$ git rebase \-i main
.EE
.PP
List branches in a folder:
.IP
.EX
$ git folder list async
async/1
async/2
async/2.5
async/3
async/4
async/bigbooty
async/temp
.EE
.PP
Delete old branches, keeping from 4 onward:
.IP
.EX
$ git folder delete\-upto async 4
keep:
async/4
async/bigbooty
async/temp
delete:
async/1
async/2
async/2.5
async/3
confirm? [yN]
.EE
.PP
Clean up after a PR merges:
.IP
.EX
$ git folder delete async
.EE
.SH SEE ALSO
\f[B]git\f[R](1), \f[B]git\-branch\f[R](1)
.SH AUTHORS
Clay Bridges.