git-reparent-branch.1 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. '\" t
  2. .\" Title: git-reparent-branch
  3. .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
  4. .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
  5. .\" Date: 05/03/2019
  6. .\" Manual: Chromium depot_tools Manual
  7. .\" Source: depot_tools e58cce6c
  8. .\" Language: English
  9. .\"
  10. .TH "GIT\-REPARENT\-BRANC" "1" "05/03/2019" "depot_tools e58cce6c" "Chromium depot_tools Manual"
  11. .\" -----------------------------------------------------------------
  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"
  31. git-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
  42. Change 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
  46. This 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
  51. The 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
  56. Reparent to track lkgr\&.
  57. .RE
  58. .PP
  59. \-\-root
  60. .RS 4
  61. Reparent to track the
  62. \fIroot\fR
  63. branch\&. 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
  69. Some 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
  87. Part 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\&.
  88. .SH "NOTES"
  89. .IP " 1." 4
  90. here
  91. .RS 4
  92. \%https://chromium.googlesource.com/chromium/tools/depot_tools.git
  93. .RE