Commit 7fa4fbc4 authored by Clemens Hammacher's avatar Clemens Hammacher Committed by Commit Bot

Update documentation of `git new-branch`

Include verbose output of `git map-branches` to make visible what the
state of the different branches is.

R=iannucci@chromium.org

Change-Id: I4af03ef15b39e4ba84a41c01d1ec801e7bb4bbd6
Reviewed-on: https://chromium-review.googlesource.com/c/1360711Reviewed-by: 's avatarRobbie Iannucci <iannucci@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
parent 03640c7f
This diff is collapsed.
'\" t '\" t
.\" Title: git-new-branch .\" Title: git-new-branch
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/> .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 12/15/2016 .\" Date: 12/05/2018
.\" Manual: Chromium depot_tools Manual .\" Manual: Chromium depot_tools Manual
.\" Source: depot_tools f72f1ad .\" Source: depot_tools 0379dbb3
.\" Language: English .\" Language: English
.\" .\"
.TH "GIT\-NEW\-BRANCH" "1" "12/15/2016" "depot_tools f72f1ad" "Chromium depot_tools Manual" .TH "GIT\-NEW\-BRANCH" "1" "12/05/2018" "depot_tools 0379dbb3" "Chromium depot_tools Manual"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * Define some portability stuff .\" * Define some portability stuff
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
...@@ -77,43 +77,51 @@ This configures the default \fIupstream\fR for all new branches\&. If it is unse ...@@ -77,43 +77,51 @@ This configures the default \fIupstream\fR for all new branches\&. If it is unse
.RS 4 .RS 4
.\} .\}
.nf .nf
\fB$ git map\-branches\fR \fB$ git map\-branches \-v\fR
origin/master origin/master
cool_feature cool_feature [ ahead 4 ]
subfeature subfeature [ ahead 2 | behind 1 ]
fixit fixit [ ahead 2 ]
\fB frozen_branch * \fB frozen_branch * [ ahead 3 ]
$ git new\-branch independent_cl\fR $ git new\-branch independent_cl\fR
\fB$ git map\-branches\fR \fB$ git map\-branches \-v\fR
\fBorigin/master \fBorigin/master
\fR cool_feature \fR cool_feature [ ahead 4 ]
subfeature subfeature [ ahead 2 | behind 1 ]
fixit fixit [ ahead 2 ]
frozen_branch frozen_branch [ ahead 3 ]
\fB independent_cl * \fB independent_cl *
$ vi foo && git add \-A && git commit \-m foo\fR
\fB$ git map\-branches \-v\fR
origin/master
cool_feature [ ahead 4 ]
subfeature [ ahead 2 | behind 1 ]
fixit [ ahead 2 ]
frozen_branch [ ahead 3 ]
\fB independent_cl * [ ahead 1 ]
$ git new\-branch \-\-upstream subfeature nested_cl\fR $ git new\-branch \-\-upstream subfeature nested_cl\fR
\fB$ git map\-branches\fR \fB$ git map\-branches \-v\fR
origin/master origin/master
cool_feature cool_feature [ ahead 4 ]
\fB subfeature \fR\fB\fB(1)\fR\fR\fB \fB subfeature [ ahead 2 | behind 1 ] \fR\fB\fB(1)\fR\fR\fB
nested_cl * nested_cl *
\fR fixit \fR fixit [ ahead 2 ]
frozen_branch frozen_branch [ ahead 3 ]
independent_cl independent_cl [ ahead 1 ]
\fB$ git checkout cool_feature\fR \fB$ git checkout cool_feature\fR
Switched to branch \*(Aqcool_feature\*(Aq Switched to branch \*(Aqcool_feature\*(Aq
Your branch is ahead of \*(Aqorigin/master\*(Aq by 4 commits\&. Your branch is ahead of \*(Aqorigin/master\*(Aq by 4 commits\&.
(use "git push" to publish your local commits) (use "git push" to publish your local commits)
\fB$ git new\-branch \-\-upstream_current cl_depends_on_cool_feature\fR \fB$ git new\-branch \-\-upstream_current cl_depends_on_cool_feature\fR
\fB$ git map\-branches\fR \fB$ git map\-branches \-v\fR
origin/master origin/master
\fB cool_feature \fB cool_feature [ ahead 4 ]
cl_depends_on_cool_feature * cl_depends_on_cool_feature *
\fR subfeature \fR subfeature [ ahead 2 | behind 1 ]
nested_cl nested_cl
fixit fixit [ ahead 2 ]
frozen_branch frozen_branch [ ahead 3 ]
independent_cl independent_cl [ ahead 1 ]
.fi .fi
.if n \{\ .if n \{\
.RE .RE
......
#!/usr/bin/env bash #!/usr/bin/env bash
. demo_repo.sh . demo_repo.sh
run git map-branches run git map-branches -v
run git new-branch independent_cl run git new-branch independent_cl
run git map-branches run git map-branches -v
praw vi foo \&\& git add -A \&\& git commit -m 'foo'
silent echo 'foo' >foo
silent git add -A
silent git commit -m 'foo'
run git map-branches -v
run git new-branch --upstream subfeature nested_cl run git new-branch --upstream subfeature nested_cl
callout 3 callout 3
run git map-branches run git map-branches -v
run git checkout cool_feature 2>&1 run git checkout cool_feature 2>&1
run git new-branch --upstream_current cl_depends_on_cool_feature run git new-branch --upstream_current cl_depends_on_cool_feature
run git map-branches run git map-branches -v
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment