git-map-branches.1 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. '\" t
  2. .\" Title: git-map-branches
  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\-MAP\-BRANCHES" "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-map-branches \- Helper script to display all local git branches with \(oqupstream\(cq hierarchy in colorized terminal format\&.
  32. .SH "SYNOPSIS"
  33. .sp
  34. .nf
  35. \fIgit map\-branches\fR
  36. .fi
  37. .sp
  38. .SH "DESCRIPTION"
  39. .sp
  40. Git map\-branches displays all local branches such that:
  41. .sp
  42. .RS 4
  43. .ie n \{\
  44. \h'-04'\(bu\h'+03'\c
  45. .\}
  46. .el \{\
  47. .sp -1
  48. .IP \(bu 2.3
  49. .\}
  50. Current branch is
  51. cyan\&.
  52. .sp
  53. .RS 4
  54. .ie n \{\
  55. \h'-04'\(bu\h'+03'\c
  56. .\}
  57. .el \{\
  58. .sp -1
  59. .IP \(bu 2.3
  60. .\}
  61. The branch which will be modified with git\-commit is denoted with an asterisk (*) after the name\&.
  62. .RE
  63. .RE
  64. .sp
  65. .RS 4
  66. .ie n \{\
  67. \h'-04'\(bu\h'+03'\c
  68. .\}
  69. .el \{\
  70. .sp -1
  71. .IP \(bu 2.3
  72. .\}
  73. Local branches are
  74. green\&.
  75. .RE
  76. .sp
  77. .RS 4
  78. .ie n \{\
  79. \h'-04'\(bu\h'+03'\c
  80. .\}
  81. .el \{\
  82. .sp -1
  83. .IP \(bu 2.3
  84. .\}
  85. Remote branches are
  86. red
  87. (usually, the root of all other branches)\&.
  88. .RE
  89. .sp
  90. .RS 4
  91. .ie n \{\
  92. \h'-04'\(bu\h'+03'\c
  93. .\}
  94. .el \{\
  95. .sp -1
  96. .IP \(bu 2.3
  97. .\}
  98. \fIbranch\-heads\fR
  99. branches are
  100. blue\&.
  101. .RE
  102. .sp
  103. .RS 4
  104. .ie n \{\
  105. \h'-04'\(bu\h'+03'\c
  106. .\}
  107. .el \{\
  108. .sp -1
  109. .IP \(bu 2.3
  110. .\}
  111. {NO UPSTREAM}
  112. is a special placeholder in
  113. magenta\&.
  114. .sp
  115. .RS 4
  116. .ie n \{\
  117. \h'-04'\(bu\h'+03'\c
  118. .\}
  119. .el \{\
  120. .sp -1
  121. .IP \(bu 2.3
  122. .\}
  123. Branches which have this as their parent are usually misconfigured, and should be assigned a parent by checking out the branch and running git branch \-\-set\-upstream\-to=<correct parent branch>\&.
  124. .RE
  125. .RE
  126. .if n \{\
  127. .sp
  128. .\}
  129. .RS 4
  130. .it 1 an-trap
  131. .nr an-no-space-flag 1
  132. .nr an-break-flag 1
  133. .br
  134. .ps +1
  135. \fBNote\fR
  136. .ps -1
  137. .br
  138. .sp
  139. If multiple branches are on the same commit, they will all be cyan\&.
  140. .sp .5v
  141. .RE
  142. .SH "OPTIONS"
  143. .PP
  144. \-\-no\-color
  145. .RS 4
  146. Turn off colors\&.
  147. .RE
  148. .PP
  149. \-v
  150. .RS 4
  151. Be more verbose\&. Pass once to show tracking info, twice for hash and review URL, thrice for review status\&.
  152. .RE
  153. .SH "EXAMPLE"
  154. .sp
  155. Given the hypothetical demo repo in \fBgit-map\fR(1)\*(Aqs EXAMPLE section, and assuming that the frozen_changes branch was currently checked out, running \fIgit map\-branches\fR would result in an output like:
  156. .sp
  157. .sp
  158. .if n \{\
  159. .RS 4
  160. .\}
  161. .nf
  162. \fB$ git map\-branches\fR
  163. {NO_UPSTREAM}
  164. no_upstream
  165. origin/master
  166. cool_feature
  167. subfeature
  168. fixit
  169. \fB frozen_branch *
  170. $ git map\-branches \-v\fR
  171. {NO_UPSTREAM}
  172. no_upstream
  173. origin/master
  174. cool_feature [ ahead 4 ]
  175. subfeature [ ahead 2 | behind 1 ]
  176. fixit [ ahead 2 ]
  177. \fB frozen_branch * [ ahead 3 ]\fR
  178. .fi
  179. .if n \{\
  180. .RE
  181. .\}
  182. .sp
  183. .SH "SUGGESTED ALIASES"
  184. .sp
  185. Some common short\-hand aliases\&. Feel free to add these to your \fI~/\&.gitconfig\fR file\&.
  186. .sp
  187. .if n \{\
  188. .RS 4
  189. .\}
  190. .nf
  191. [alias]
  192. git bmap = map\-branches
  193. .fi
  194. .if n \{\
  195. .RE
  196. .\}
  197. .sp
  198. .SH "SEE ALSO"
  199. .sp
  200. \fBgit-map\fR(1)
  201. .SH "CHROMIUM DEPOT_TOOLS"
  202. .sp
  203. 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\&.
  204. .SH "NOTES"
  205. .IP " 1." 4
  206. here
  207. .RS 4
  208. \%https://chromium.googlesource.com/chromium/tools/depot_tools.git
  209. .RE