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
.\" Title: git-new-branch
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
.\" Date: 12/15/2016
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 12/05/2018
.\" Manual: Chromium depot_tools Manual
.\" Source: depot_tools f72f1ad
.\" Source: depot_tools 0379dbb3
.\" 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
.\" -----------------------------------------------------------------
......@@ -77,43 +77,51 @@ This configures the default \fIupstream\fR for all new branches\&. If it is unse
.RS 4
.\}
.nf
\fB$ git map\-branches\fR
\fB$ git map\-branches \-v\fR
origin/master
cool_feature
subfeature
fixit
\fB frozen_branch *
cool_feature [ ahead 4 ]
subfeature [ ahead 2 | behind 1 ]
fixit [ ahead 2 ]
\fB frozen_branch * [ ahead 3 ]
$ git new\-branch independent_cl\fR
\fB$ git map\-branches\fR
\fB$ git map\-branches \-v\fR
\fBorigin/master
\fR cool_feature
subfeature
fixit
frozen_branch
\fR cool_feature [ ahead 4 ]
subfeature [ ahead 2 | behind 1 ]
fixit [ ahead 2 ]
frozen_branch [ ahead 3 ]
\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
\fB$ git map\-branches\fR
\fB$ git map\-branches \-v\fR
origin/master
cool_feature
\fB subfeature \fR\fB\fB(1)\fR\fR\fB
cool_feature [ ahead 4 ]
\fB subfeature [ ahead 2 | behind 1 ] \fR\fB\fB(1)\fR\fR\fB
nested_cl *
\fR fixit
frozen_branch
independent_cl
\fR fixit [ ahead 2 ]
frozen_branch [ ahead 3 ]
independent_cl [ ahead 1 ]
\fB$ git checkout cool_feature\fR
Switched to branch \*(Aqcool_feature\*(Aq
Your branch is ahead of \*(Aqorigin/master\*(Aq by 4 commits\&.
(use "git push" to publish your local commits)
\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
\fB cool_feature
\fB cool_feature [ ahead 4 ]
cl_depends_on_cool_feature *
\fR subfeature
\fR subfeature [ ahead 2 | behind 1 ]
nested_cl
fixit
frozen_branch
independent_cl
fixit [ ahead 2 ]
frozen_branch [ ahead 3 ]
independent_cl [ ahead 1 ]
.fi
.if n \{\
.RE
......
#!/usr/bin/env bash
. demo_repo.sh
run git map-branches
run git map-branches -v
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
callout 3
run git map-branches
run git map-branches -v
run git checkout cool_feature 2>&1
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