blob: db33158e8ecf8dd6ef28cd51f5942d97adc92031 [file] [log] [blame]
iannucci@chromium.orgc050a5b2014-03-26 06:18:50 +00001git-reparent-branch(1)
2=====================
3
4NAME
5----
6git-reparent-branch -
7include::_git-reparent-branch_desc.helper.txt[]
8
9SYNOPSIS
10--------
11[verse]
12'git reparent-branch' <new_parent>
13'git reparent-branch' --lkgr
14'git reparent-branch' --root
15
16DESCRIPTION
17-----------
18
19Change the 'upstream' of the current branch, and then run
20linkgit:git-rebase-update[1] to move the commits in the current branch, as well
21as the commits in all descendant branches, onto the new parent.
22
23`<new_parent>` may be either a local branch, remote branch, OR a tag (such as
24`lkgr`).
25
26This is particularly useful to reparent an independent CL to become dependent on
27another CL, or vice versa. This could happen if you started both on the
28assumption that they were independent, but later realized that this was not the
29case.
30
31
32OPTIONS
33-------
34
35<new_parent>::
36 The new parent to set as the upstream for this branch. May be a branch ref or
37 a tag.
38
39--lkgr::
40 Reparent to track lkgr.
41
42--root::
43 Reparent to track the 'root' branch. Defaults to 'origin/master'. See
44 linkgit:git-new-branch[1]'s CONFIGURATION VARIABLES section..
45
46
47include::_aliases.txt[]
48
49----
50[alias]
51 git rp = reparent-branch
52----
53
54SEE ALSO
55--------
56linkgit:git-rebase-update[1], linkgit:git-rename-branch[1],
57linkgit:git-new-branch[1], linkgit:git-upstream-diff[1]
58
59include::_footer.txt[]
60
61// vim: ft=asciidoc: