git-map-branches.1 3.78 KB
Newer Older
1 2 3
'\" t
.\"     Title: git-map-branches
.\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
4 5
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
.\"      Date: 09/23/2014
6
.\"    Manual: Chromium depot_tools Manual
7
.\"    Source: depot_tools 28bf2be
8 9
.\"  Language: English
.\"
10
.TH "GIT\-MAP\-BRANCHES" "1" "09/23/2014" "depot_tools 28bf2be" "Chromium depot_tools Manual"
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
git-map-branches \- Helper script to display all local git branches with \(oqupstream\(cq hierarchy in colorized terminal format\&.
.SH "SYNOPSIS"
.sp
.nf
\fIgit map\-branches\fR
.fi
.sp
.SH "DESCRIPTION"
.sp
Git map\-branches displays all local branches such that:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Current branch is
cyan\&.
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
The branch which will be modified with git\-commit is denoted with an asterisk (*) after the name\&.
.RE
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Local branches are
green\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Remote branches are
red
(usually, the root of all other branches)\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112

\fIbranch\-heads\fR
branches are
blue\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}

113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146
{NO UPSTREAM}
is a special placeholder in
magenta\&.
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
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>\&.
.RE
.RE
.if n \{\
.sp
.\}
.RS 4
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.ps +1
\fBNote\fR
.ps -1
.br
.sp
If multiple branches are on the same commit, they will all be cyan\&.
.sp .5v
.RE
.SH "EXAMPLE"
.sp
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:
147 148
.sp

149 150 151 152 153 154
.sp
.if n \{\
.RS 4
.\}
.nf
\fB$ git map\-branches\fR
155 156
{NO_UPSTREAM}
  no_upstream
157 158 159
origin/master
  cool_feature
    subfeature
160
  fixit
161
\fB    frozen_branch *\fR
162 163 164 165 166
.fi
.if n \{\
.RE
.\}
.sp
167 168 169 170 171 172 173 174 175 176 177 178 179 180 181
.SH "SUGGESTED ALIASES"
.sp
Some common short\-hand aliases\&. Feel free to add these to your \fI~/\&.gitconfig\fR file\&.
.sp
.if n \{\
.RS 4
.\}
.nf
[alias]
  git bmap = map\-branches
.fi
.if n \{\
.RE
.\}
.sp
182 183 184 185 186
.SH "SEE ALSO"
.sp
\fBgit-map\fR(1)
.SH "CHROMIUM DEPOT_TOOLS"
.sp
187
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\&.
188 189 190 191 192 193
.SH "NOTES"
.IP " 1." 4
here
.RS 4
\%https://chromium.googlesource.com/chromium/tools/depot_tools.git
.RE