git-map-branches.1 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. '\" t
  2. .\" Title: git-map-branches
  3. .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
  4. .\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
  5. .\" Date: 03/25/2014
  6. .\" Manual: Chromium depot_tools Manual
  7. .\" Source: depot_tools 207bff1
  8. .\" Language: English
  9. .\"
  10. .TH "GIT\-MAP\-BRANCHES" "1" "03/25/2014" "depot_tools 207bff1" "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. {NO UPSTREAM}
  99. is a special placeholder in
  100. magenta\&.
  101. .sp
  102. .RS 4
  103. .ie n \{\
  104. \h'-04'\(bu\h'+03'\c
  105. .\}
  106. .el \{\
  107. .sp -1
  108. .IP \(bu 2.3
  109. .\}
  110. 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>\&.
  111. .RE
  112. .RE
  113. .if n \{\
  114. .sp
  115. .\}
  116. .RS 4
  117. .it 1 an-trap
  118. .nr an-no-space-flag 1
  119. .nr an-break-flag 1
  120. .br
  121. .ps +1
  122. \fBNote\fR
  123. .ps -1
  124. .br
  125. .sp
  126. If multiple branches are on the same commit, they will all be cyan\&.
  127. .sp .5v
  128. .RE
  129. .SH "EXAMPLE"
  130. .sp
  131. 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:
  132. .sp
  133. .if n \{\
  134. .RS 4
  135. .\}
  136. .nf
  137. \fB$ git map\-branches\fR
  138. origin/master
  139. cool_feature
  140. subfeature
  141. frozen_changes *
  142. master
  143. {NO UPSTREAM}
  144. bogus_noparent
  145. duplicate_cool_feature_no_upstream
  146. .fi
  147. .if n \{\
  148. .RE
  149. .\}
  150. .sp
  151. .SH "SUGGESTED ALIASES"
  152. .sp
  153. Some common short\-hand aliases\&. Feel free to add these to your \fI~/\&.gitconfig\fR file\&.
  154. .sp
  155. .if n \{\
  156. .RS 4
  157. .\}
  158. .nf
  159. [alias]
  160. git bmap = map\-branches
  161. .fi
  162. .if n \{\
  163. .RE
  164. .\}
  165. .sp
  166. .SH "SEE ALSO"
  167. .sp
  168. \fBgit-map\fR(1)
  169. .SH "CHROMIUM DEPOT_TOOLS"
  170. .sp
  171. Part of the chromium \fBdepot_tools\fR(1) 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\&.
  172. .SH "NOTES"
  173. .IP " 1." 4
  174. here
  175. .RS 4
  176. \%https://chromium.googlesource.com/chromium/tools/depot_tools.git
  177. .RE