You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Walk the branches in the order as they occur in branch layout file.
2087
2087
By default, \fBtraverse\fP starts from the current branch.
2088
-
This behavior can, however, be customized using options: \fB\-\-start\-from=\fP, \fB\-\-whole\fPor \fB\-w\fP,\fB\-W\fP\&.
2088
+
This behavior can, however, be customized using options: \fB\-\-start\-from=...\fP, \fB\-\-whole\fP(\fB\-w\fP) or\fB\-W\fP\&.
2089
2089
.sp
2090
-
For each branch, the command:
2090
+
For each branch, the command performs the following actions:
2091
+
.sp
2092
+
\fBSynctoparent\fP
2091
2093
.INDENT0.0
2092
2094
.IP\(bu2
2093
2095
detects if the branch is merged (gray edge) to its parent (aka upstream):
@@ -2102,6 +2104,10 @@ otherwise, if the branch has a red or yellow edge to its parent/upstream (see he
2102
2104
asks the user whether to \fBrebase\fP (default) or merge (if \fB\-\-merge\fP passed) the branch onto into its upstream branch
2103
2105
\-\-\- equivalent to \fBgitmacheteupdate\fP;
2104
2106
.UNINDENT
2107
+
.UNINDENT
2108
+
.sp
2109
+
\fBSynctoremote\fP
2110
+
.INDENT0.0
2105
2111
.IP\(bu2
2106
2112
if the branch is not tracked on a remote, is ahead of its remote counterpart, or diverged from the counterpart &
2107
2113
has newer head commit than the counterpart:
@@ -2114,13 +2120,19 @@ otherwise, if the branch diverged from the remote counterpart & has older head c
2114
2120
.INDENT2.0
2115
2121
.IP\(bu2
2116
2122
asks the user whether to \fBreset\fP (\fBgitreset\-\-keep\fP) the branch to its remote counterpart
2123
+
\-\-\- note that rebase/merge isn\(aqt suggested in that case;
2117
2124
.UNINDENT
2118
2125
.IP\(bu2
2119
2126
otherwise, if the branch is behind its remote counterpart:
2120
2127
.INDENT2.0
2121
2128
.IP\(bu2
2122
-
asks the user whether to \fBpull\fP the branch;
2129
+
asks the user whether to \fBpull\fP the branch
2130
+
\-\-\- note that rebase/merge isn\(aqt suggested in that case;
2131
+
.UNINDENT
2123
2132
.UNINDENT
2133
+
.sp
2134
+
\fBSynctoGitHub/GitLab\fP
2135
+
.INDENT0.0
2124
2136
.IP\(bu2
2125
2137
if \fB\-H\fP/\fB\-\-sync\-github\-prs\fP or \fB\-L\fP/\fB\-\-sync\-gitlab\-mrs\fP option is present:
2126
2138
.INDENT2.0
@@ -2131,18 +2143,18 @@ asks the user whether to \fBretarget\fP the PR/MR if it exists for the given bra
2131
2143
and its base/target branch in GitHub/GitLab is different than the upstream in machete file
2132
2144
(just as \fBgitmachetegithubretarget\-pr\fP and \fBgitmachetegitlabretarget\-mr\fP would do);
2133
2145
.UNINDENT
2146
+
.UNINDENT
2147
+
.sp
2148
+
\fBStatus\fP
2149
+
.INDENT0.0
2134
2150
.IP\(bu2
2135
-
and finally, if any of the above operations has been successfully completed:
2151
+
finally, if any of the above operations has been successfully completed:
2136
2152
.INDENT2.0
2137
2153
.IP\(bu2
2138
2154
prints the updated \fBstatus\fP\&.
2139
2155
.UNINDENT
2140
2156
.UNINDENT
2141
2157
.sp
2142
-
By default \fBtraverse\fP asks if the branch should be pushed. This behavior can, however, be changed with the \fBmachete.traverse.push\fP configuration key.
2143
-
It can also be customized using options: \fB\-\-[no\-]push\fP or \fB\-\-[no\-]push\-untracked\fP\-\-\- the order of the flags defines their precedence over each other
2144
-
(the one on the right overriding the ones on the left). More on them in the \fBOptions\fP section below.
2145
-
.sp
2146
2158
If the traverse flow is stopped (typically due to merge/rebase conflicts), just run \fBgitmachetetraverse\fP after the merge/rebase is finished.
2147
2159
It will pick up the walk from the current branch.
2148
2160
Unlike with \fBgitrebase\fP or \fBgitcherry\-pick\fP, there is no special \fB\-\-continue\fP flag, as \fBtraverse\fP is stateless.
Copy file name to clipboardExpand all lines: docs/source/cli/traverse.rst
+14-8Lines changed: 14 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,9 +26,11 @@ traverse
26
26
27
27
Walk the branches in the order as they occur in branch layout file.
28
28
By default, ``traverse`` starts from the current branch.
29
-
This behavior can, however, be customized using options: ``--start-from=``, ``--whole`` or ``-w``, ``-W``.
29
+
This behavior can, however, be customized using options: ``--start-from=...``, ``--whole`` (``-w``) or ``-W``.
30
30
31
-
For each branch, the command:
31
+
For each branch, the command performs the following actions:
32
+
33
+
**Sync to parent**
32
34
33
35
* detects if the branch is merged (:gray:`gray` edge) to its parent (aka upstream):
34
36
@@ -39,6 +41,8 @@ For each branch, the command:
39
41
- asks the user whether to **rebase** (default) or merge (if ``--merge`` passed) the branch onto into its upstream branch
40
42
--- equivalent to ``git machete update``;
41
43
44
+
**Sync to remote**
45
+
42
46
* if the branch is not tracked on a remote, is ahead of its remote counterpart, or diverged from the counterpart &
43
47
has newer head commit than the counterpart:
44
48
@@ -47,10 +51,14 @@ For each branch, the command:
47
51
* otherwise, if the branch diverged from the remote counterpart & has older head commit than the counterpart:
48
52
49
53
- asks the user whether to **reset** (``git reset --keep``) the branch to its remote counterpart
54
+
--- note that rebase/merge isn't suggested in that case;
50
55
51
56
* otherwise, if the branch is behind its remote counterpart:
52
57
53
-
- asks the user whether to **pull** the branch;
58
+
- asks the user whether to **pull** the branch
59
+
--- note that rebase/merge isn't suggested in that case;
60
+
61
+
**Sync to GitHub/GitLab**
54
62
55
63
* if ``-H``/``--sync-github-prs`` or ``-L``/``--sync-gitlab-mrs`` option is present:
56
64
@@ -60,13 +68,11 @@ For each branch, the command:
60
68
and its base/target branch in GitHub/GitLab is different than the upstream in machete file
61
69
(just as ``git machete github retarget-pr`` and ``git machete gitlab retarget-mr`` would do);
62
70
63
-
* and finally, if any of the above operations has been successfully completed:
71
+
**Status**
64
72
65
-
- prints the updated ``status``.
73
+
* finally, if any of the above operations has been successfully completed:
66
74
67
-
By default ``traverse`` asks if the branch should be pushed. This behavior can, however, be changed with the ``machete.traverse.push`` configuration key.
68
-
It can also be customized using options: ``--[no-]push`` or ``--[no-]push-untracked`` --- the order of the flags defines their precedence over each other
69
-
(the one on the right overriding the ones on the left). More on them in the **Options** section below.
75
+
- prints the updated ``status``.
70
76
71
77
If the traverse flow is stopped (typically due to merge/rebase conflicts), just run ``git machete traverse`` after the merge/rebase is finished.
0 commit comments