| OLD | NEW |
| (Empty) |
| 1 '\" t | |
| 2 .\" Title: git-new-branch | |
| 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: 04/10/2014 | |
| 6 .\" Manual: Chromium depot_tools Manual | |
| 7 .\" Source: depot_tools 68b1017 | |
| 8 .\" Language: English | |
| 9 .\" | |
| 10 .TH "GIT\-NEW\-BRANCH" "1" "04/10/2014" "depot_tools 68b1017" "Chromium depot_to
ols 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-new-branch \- Create a new branch with correct tracking information\&. | |
| 32 .SH "SYNOPSIS" | |
| 33 .sp | |
| 34 .nf | |
| 35 \fIgit new\-branch\fR <branch_name> | |
| 36 \fIgit new\-branch\fR \-\-upstream_current <branch_name> | |
| 37 \fIgit new\-branch\fR \-\-upstream <REF> <branch_name> | |
| 38 \fIgit new\-branch\fR \-\-lkgr <branch_name> | |
| 39 .fi | |
| 40 .sp | |
| 41 .SH "DESCRIPTION" | |
| 42 .sp | |
| 43 Creates a new branch\&. By default the new branch will track the configured upst
ream for the repo (defaults to \fIorigin/master\fR)\&. If one of the other optio
ns is specified, it will track that other ref instead\&. | |
| 44 .sp | |
| 45 Conceptually, each branch in your repo represents one \fIChange List (CL)\fR\&.
If you have many independent CLs (i\&.e\&. the changes in one do not interact wi
th/depend on the changes in another), then you should create them as new branche
s tracking the default upstream (i\&.e\&. git new\-branch <branch_name>)\&. If y
ou have features which depend on each other, you should create stacked branches
using git new\-branch \-\-upstream_current <branch_name>\&. | |
| 46 .SH "OPTIONS" | |
| 47 .PP | |
| 48 \-\-upstream_current | |
| 49 .RS 4 | |
| 50 Set the tracking (upstream) branch to the currently\-checked\-out branch\&. | |
| 51 .RE | |
| 52 .PP | |
| 53 \-\-uptstream <REF> | |
| 54 .RS 4 | |
| 55 Set the tracking (upstream) branch to <REF>\&. <REF> may be a local branch, remo
te branch, or a tag\&. | |
| 56 .RE | |
| 57 .PP | |
| 58 \-\-lkgr | |
| 59 .RS 4 | |
| 60 Alias for | |
| 61 \-\-upstream lkgr\&. | |
| 62 .RE | |
| 63 .PP | |
| 64 <branch_name> | |
| 65 .RS 4 | |
| 66 The name for the new branch\&. | |
| 67 .RE | |
| 68 .SH "CONFIGURATION VARIABLES" | |
| 69 .SS "depot\-tools\&.upstream" | |
| 70 .sp | |
| 71 This configures the default \fIupstream\fR for all new branches\&. If it is unse
t, it defaults to \fIorigin/master\fR\&. This is considered to be the \fIroot\fR
branch\&. | |
| 72 .SH "EXAMPLE" | |
| 73 .sp | |
| 74 | |
| 75 .sp | |
| 76 .if n \{\ | |
| 77 .RS 4 | |
| 78 .\} | |
| 79 .nf | |
| 80 \fB$ git map\-branches\fR | |
| 81 origin/master | |
| 82 cool_feature | |
| 83 subfeature | |
| 84 fixit | |
| 85 \fB frozen_branch * | |
| 86 $ git new\-branch independent_cl\fR | |
| 87 \fB$ git map\-branches\fR | |
| 88 \fBorigin/master | |
| 89 \fR cool_feature | |
| 90 subfeature | |
| 91 fixit | |
| 92 frozen_branch | |
| 93 \fB independent_cl * | |
| 94 $ git new\-branch \-\-upstream subfeature nested_cl\fR | |
| 95 \fB$ git map\-branches\fR | |
| 96 origin/master | |
| 97 cool_feature | |
| 98 \fB subfeature \fR\fB\fB(1)\fR\fR\fB | |
| 99 nested_cl * | |
| 100 \fR fixit | |
| 101 frozen_branch | |
| 102 independent_cl | |
| 103 \fB$ git checkout cool_feature\fR | |
| 104 Switched to branch \*(Aqcool_feature\*(Aq | |
| 105 Your branch is ahead of \*(Aqorigin/master\*(Aq by 4 commits\&. | |
| 106 (use "git push" to publish your local commits) | |
| 107 \fB$ git new\-branch \-\-upstream_current cl_depends_on_cool_feature\fR | |
| 108 \fB$ git map\-branches\fR | |
| 109 origin/master | |
| 110 \fB cool_feature | |
| 111 cl_depends_on_cool_feature * | |
| 112 \fR subfeature | |
| 113 nested_cl | |
| 114 fixit | |
| 115 frozen_branch | |
| 116 independent_cl | |
| 117 .fi | |
| 118 .if n \{\ | |
| 119 .RE | |
| 120 .\} | |
| 121 .sp | |
| 122 | |
| 123 .sp | |
| 124 .RS 4 | |
| 125 .ie n \{\ | |
| 126 \h'-04' 1.\h'+01'\c | |
| 127 .\} | |
| 128 .el \{\ | |
| 129 .sp -1 | |
| 130 .IP " 1." 4.2 | |
| 131 .\} | |
| 132 Note that both branches are cyan because they are currently the same | |
| 133 \fIcommit\fR | |
| 134 object\&. See | |
| 135 \fBgit-map-branches\fR(1) | |
| 136 for more detail\&. | |
| 137 .RE | |
| 138 .SH "SUGGESTED ALIASES" | |
| 139 .sp | |
| 140 Some common short\-hand aliases\&. Feel free to add these to your \fI~/\&.gitcon
fig\fR file\&. | |
| 141 .sp | |
| 142 .if n \{\ | |
| 143 .RS 4 | |
| 144 .\} | |
| 145 .nf | |
| 146 [alias] | |
| 147 git nb = new\-branch | |
| 148 git tb = new\-branch \-\-upstream_current \fB(1)\fR | |
| 149 .fi | |
| 150 .if n \{\ | |
| 151 .RE | |
| 152 .\} | |
| 153 .sp | |
| 154 .sp | |
| 155 \fB1. \fRmnemonic: tb \(-> "track branch" | |
| 156 .br | |
| 157 .SH "SEE ALSO" | |
| 158 .sp | |
| 159 \fBgit-rebase-update\fR(1), \fBgit-reparent-branch\fR(1), \fBgit-rename-branch\f
R(1), \fBgit-upstream-diff\fR(1) | |
| 160 .SH "CHROMIUM DEPOT_TOOLS" | |
| 161 .sp | |
| 162 Part of the chromium \fBdepot_tools\fR(7) suite\&. These tools are meant to assi
st with the development of chromium and related projects\&. Download the tools f
rom \m[blue]\fBhere\fR\m[]\&\s-2\u[1]\d\s+2\&. | |
| 163 .SH "NOTES" | |
| 164 .IP " 1." 4 | |
| 165 here | |
| 166 .RS 4 | |
| 167 \%https://chromium.googlesource.com/chromium/tools/depot_tools.git | |
| 168 .RE | |
| OLD | NEW |