blob: a6050ecd0c6197c7098c2abf35c9a48780aa8bed [file] [log] [blame]
iannucci@chromium.orgc050a5b2014-03-26 06:18:50 +00001'\" t
2.\" Title: git-reparent-branch
3.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
4.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
Quinten Yearsley442fb642016-12-15 15:38:27 -08005.\" Date: 12/15/2016
iannucci@chromium.orgc050a5b2014-03-26 06:18:50 +00006.\" Manual: Chromium depot_tools Manual
Quinten Yearsley442fb642016-12-15 15:38:27 -08007.\" Source: depot_tools f72f1ad
iannucci@chromium.orgc050a5b2014-03-26 06:18:50 +00008.\" Language: English
9.\"
Quinten Yearsley442fb642016-12-15 15:38:27 -080010.TH "GIT\-REPARENT\-BRANC" "1" "12/15/2016" "depot_tools f72f1ad" "Chromium depot_tools Manual"
iannucci@chromium.orgc050a5b2014-03-26 06:18:50 +000011.\" -----------------------------------------------------------------
12.\" * Define some portability stuff
13.\" -----------------------------------------------------------------
14.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15.\" http://bugs.debian.org/507673
16.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18.ie \n(.g .ds Aq \(aq
19.el .ds Aq '
20.\" -----------------------------------------------------------------
21.\" * set default formatting
22.\" -----------------------------------------------------------------
23.\" disable hyphenation
24.nh
25.\" disable justification (adjust text to left margin only)
26.ad l
27.\" -----------------------------------------------------------------
28.\" * MAIN CONTENT STARTS HERE *
29.\" -----------------------------------------------------------------
30.SH "NAME"
31git-reparent-branch \- Alter the parentage (upstream) for the current branch\&.
32.SH "SYNOPSIS"
33.sp
34.nf
35\fIgit reparent\-branch\fR <new_parent>
36\fIgit reparent\-branch\fR \-\-lkgr
37\fIgit reparent\-branch\fR \-\-root
38.fi
39.sp
40.SH "DESCRIPTION"
41.sp
42Change the \fIupstream\fR of the current branch, and then run \fBgit-rebase-update\fR(1) to move the commits in the current branch, as well as the commits in all descendant branches, onto the new parent\&.
43.sp
44<new_parent> may be either a local branch, remote branch, OR a tag (such as lkgr)\&.
45.sp
46This is particularly useful to reparent an independent CL to become dependent on another CL, or vice versa\&. This could happen if you started both on the assumption that they were independent, but later realized that this was not the case\&.
47.SH "OPTIONS"
48.PP
49<new_parent>
50.RS 4
51The new parent to set as the upstream for this branch\&. May be a branch ref or a tag\&.
52.RE
53.PP
54\-\-lkgr
55.RS 4
56Reparent to track lkgr\&.
57.RE
58.PP
59\-\-root
60.RS 4
61Reparent to track the
62\fIroot\fR
63branch\&. Defaults to
64\fIorigin/master\fR\&. See
65\fBgit-new-branch\fR(1)\*(Aqs CONFIGURATION VARIABLES section\&.\&.
66.RE
67.SH "SUGGESTED ALIASES"
68.sp
69Some common short\-hand aliases\&. Feel free to add these to your \fI~/\&.gitconfig\fR file\&.
70.sp
71.if n \{\
72.RS 4
73.\}
74.nf
75[alias]
76 git rp = reparent\-branch
77.fi
78.if n \{\
79.RE
80.\}
81.sp
82.SH "SEE ALSO"
83.sp
84\fBgit-rebase-update\fR(1), \fBgit-rename-branch\fR(1), \fBgit-new-branch\fR(1), \fBgit-upstream-diff\fR(1)
85.SH "CHROMIUM DEPOT_TOOLS"
86.sp
iannucci@chromium.org21980022014-04-11 04:51:49 +000087Part of the chromium \fBdepot_tools\fR(7) suite\&. These tools are meant to assist with the development of chromium and related projects\&. Download the tools from \m[blue]\fBhere\fR\m[]\&\s-2\u[1]\d\s+2\&.
iannucci@chromium.orgc050a5b2014-03-26 06:18:50 +000088.SH "NOTES"
89.IP " 1." 4
90here
91.RS 4
Quinten Yearsley442fb642016-12-15 15:38:27 -080092\%https://chromium.googlesource.com/chromium/tools/depot_tools.git
iannucci@chromium.orgc050a5b2014-03-26 06:18:50 +000093.RE