blob: 01a21cb7de615106ebf73e97e21d61b1db022649 (
plain)
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
|
.TH GIT-REBASE-SUBTREE 1 "@PACKAGE_TARNAME@ @PACKAGE_VERSION@" "2007\-11\-02" "@PACKAGE_NAME@ @PACKAGE_VERSION@"
.SH NAME
git\-rebase\-subtree \- rebase set of interdependant git branches
.SH SYNOPSIS
.B "git\-rebase\-subtree"
.I "<origin-branch>"
.I "<master-branch>"
.PP
.B "git\-rebase\-subtree"
.I "\-\-reverse"
.I "<master-branch>"
.I "<master-branch-plus-x>"
.SH DESCRIPTION
So you are tracking some upstream's git repo and maintain your own set
of interdependent feature branches ("branch subtree").
.PP
And you want to keep that "branch subtree" up-to-date in relation to
upstream so it stays sweet, small, and clean, increasing the chances
that upstream will finally pick something up from it.
.PP
Initial situation: Local branch master tracks remote origin.
.PP
Note: Letters A\-Z are branch names, not revs.
.PP
Old tree:
.nf
*\-\-F
/
origin=master\-\-A\-\-B\-\-G
\\
*\-\-D\-\-H
\\
*\-\-*\-\-K
.fi
.PP
Generate the following configuration using
.I "git config rebase-subtree.subtree"
.nf
master A
A B
B F
B G
A D
D H
D K
.fi
.PP
After "git\-fetch \-v":
.nf
*\-\-F
/
master\-\-\-A\-\-B\-\-G
\\ \\
* *\-\-D\-\-H
\\ \\
origin' *\-\-*\-\-K
.fi
.PP
After hypothetical "git\-rebase\-subtree origin master":
.nf
*'\-\-F'
/
origin'=master'\-\-A'\-\-B'\-\-G'
\\
*'\-\-D'\-\-H'
\\
*'\-\-*'\-\-K'
.fi
.SS "REVERSE OPERATION"
.PP
Old tree:
.nf
*\-\-F
/
master\-\-Y\-\-A\-\-B\-\-G
\\
*\-\-D\-\-H
\\
*\-\-*\-\-K
.fi
.PP
After hypothetical "git\-rebase\-subtree \-\-reverse master Y":
.nf
Y *'\-\-F'
/ /
master\-\-A'\-\-B'\-\-G'
\\
*'\-\-D'\-\-H'
\\
*'\-\-*'\-\-K'
.fi
.SH "BUGS"
.TP
.B "Lacks generality (fixation about 'master')"
Yes.
.SH "SEE ALSO"
git\-rebase(1).
|