OLD | NEW |
---|---|
(Empty) | |
1 git-rebase-update(1) | |
2 ==================== | |
3 | |
4 NAME | |
5 ---- | |
6 git-rebase-update - | |
7 include::_git-rebase-update_desc.helper.txt[] | |
8 | |
9 SYNOPSIS | |
10 -------- | |
11 [verse] | |
12 'git rebase-update' [-v | --verbose] [-n | --no_fetch] | |
13 | |
14 DESCRIPTION | |
15 ----------- | |
16 | |
17 Brings all branches up-to-date with their tracking branches. This involves | |
18 several phases: | |
19 | |
20 Preparation:: | |
21 If you currently have a branch checked out, any changes on that branch a re | |
agable
2014/03/25 19:37:23
Lots of >80 character lines in this file.
| |
22 'frozen' (See linkgit:git-freeze[1] for more detail). Additionally, the current | |
23 branch is recorded for the 'Restoration' phase later (see 'CONFIGURATION | |
24 VARIABLES' for details on `depot-tools.rebase-update.starting-branch`). | |
25 | |
26 Fetching:: | |
27 All branches are examined to find their upstream references. The correct set | |
28 of git remotes is determined, and fetched accordingly. Note that if any | |
29 branches have a tag as their upstream, we are forced to pull all remotes . | |
30 + | |
31 Pass `--no_fetch` to skip this phase. | |
32 | |
33 Rebasing:: | |
34 All branches are rebased in topological order from roots (upstreams) to leafs. | |
agable
2014/03/25 19:37:23
leaves. We're not rebasing a hockey team.
iannucci
2014/03/26 01:39:49
Done.
| |
35 Each branch is rebased from its marked merge-base (see 'CONFIGURATION | |
36 VARIABLES') to the branch tip on top of its parent branch. If the parent | |
37 branch is 'frozen' (see linkgit:git-freeze[1]), the branch will be rebas ed | |
38 onto the last non-freeze commit on the parent branch. | |
39 + | |
40 Things get interesting when there are merge conflicts on rebase. The *most | |
41 common* cause for conflicts is when your branch has been committed to the | |
42 upstream in squashed form, ala linkgit:git-squash-branch[1], which is what | |
43 linkgit:git-cl[1] and the 'Commit Queue' will do. Because of that, `git | |
44 rebase-update` will attempt to squash your conflicted branch to see if the | |
45 squashed version applies cleanly to its upstream. | |
46 + | |
47 If it does not apply cleanly, then your original (non-squashed) branch will be | |
48 left in mid-rebase and `git rebase-update` will exit. You can deal with this | |
49 like any other conflicted rebase. When you're done, just `git rebase-update` | |
50 again to pick up where you left off. | |
51 | |
52 Cleanup:: | |
53 Once all the branches have been rebased, any empty branches (i.e. branch es | |
54 with no commits on them) are removed. If a branch is removed in this fas hion, | |
55 any branches which depend on it are reparented to the parent of the remo ved | |
56 branch (see linkgit:git-reparent-branch[1]). | |
57 | |
58 Restoration:: | |
59 `git rebase-update` checks out the branch that you started on, and 'thaw s' it, | |
60 if necessary (see linkgit:git-thaw[1]). If the branch you started on got | |
61 cleaned up, `git rebase-update` will checkout the 'root' ref (defaults t o | |
62 'origin/master', as configured by `depot-tools.upstream`, see | |
63 linkgit:git-new-branch[1]). | |
64 | |
65 | |
66 OPTIONS | |
67 ------- | |
68 | |
69 -n:: | |
70 --no_fetch:: | |
71 Skip the `git fetch` phase of rebase-update. | |
72 | |
73 -v:: | |
74 --verbose:: | |
75 More text than your terminal can handle. | |
76 | |
77 | |
78 CONFIGURATION VARIABLES | |
79 ----------------------- | |
80 | |
81 depot-tools.rebase-update.starting-branch | |
82 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
83 | |
84 When `git rebase-update` first runs, it will record the current branch here so | |
85 that when it completes successfully, it will return back to the same branch you | |
86 started on, even if `git rebase-update` is interrupted due to rebase conflicts. | |
87 When `git rebase-update` completes successfully, this configuration variable is | |
88 removed. | |
89 | |
90 branch.<name>.dormant | |
91 ~~~~~~~~~~~~~~~~~~~~~ | |
92 | |
93 If `true`, will cause rebase-update to skip all processing on the branch. | |
94 Useful for old/high-conflict branches which you want to keep for posterity, but | |
95 don't want to deal with when running `git rebase-update` | |
96 | |
97 branch.<name>.base | |
agable
2014/03/25 19:37:23
I think most of this documentation should be in ma
iannucci
2014/03/26 01:39:49
Yeah but mark-merge-base will very infrequently be
| |
98 ~~~~~~~~~~~~~~~~~~ | |
99 | |
100 Holds the 'base' reference for this branch. By default this is equivalent to | |
101 `git merge-base <name> <name>@{upstream}`. However, it can diverge if | |
102 `<name>@{upstream}` is manually rebased. In this case, it correctly preserves | |
103 the value it had before, where `git merge-base` would now report the wrong | |
104 value. | |
105 | |
106 All of the tools in the linkgit:depot_tools[1] suite collude to keep this value | |
107 as up-to-date as possible, including linkgit:git-reparent-branch[1], and | |
108 linkgit:git-new-branch[1]. linkgit:git-map[1] also shows the location of these | |
109 marker values in [black-background white]**white**. | |
110 | |
111 linkgit:git-mark-merge-base[1] allows easy manual interaction for this value, | |
112 in the unlikely event that it gets out of sync. | |
113 | |
114 include::_aliases.txt[] | |
115 | |
116 ---- | |
117 [alias] | |
118 git reup = rebase-update | |
119 ---- | |
120 | |
121 | |
122 SEE ALSO | |
123 -------- | |
124 linkgit:git-new-branch[1], linkgit:git-reparent-branch[1], | |
125 linkgit:git-rename-branch[1], linkgit:git-upstream-diff[1], | |
126 linkgit:git-freeze[1], linkgit:git-mark-merge-base[1] | |
127 | |
128 include::_footer.txt[] | |
129 | |
130 // vim: ft=asciidoc noexpandtab: | |
OLD | NEW |