diff options
Diffstat (limited to 'man1/git-branch.1')
-rw-r--r-- | man1/git-branch.1 | 140 |
1 files changed, 137 insertions, 3 deletions
diff --git a/man1/git-branch.1 b/man1/git-branch.1 index 529b15a86..a70cdb3b5 100644 --- a/man1/git-branch.1 +++ b/man1/git-branch.1 @@ -2,12 +2,12 @@ .\" Title: git-branch .\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/> -.\" Date: 09/13/2022 +.\" Date: 09/14/2022 .\" Manual: Git Manual -.\" Source: Git 2.37.3.611.ge188ec3a73 +.\" Source: Git 2.37.3.662.g36f8e7ed7d .\" Language: English .\" -.TH "GIT\-BRANCH" "1" "09/13/2022" "Git 2\&.37\&.3\&.611\&.ge188ec" "Git Manual" +.TH "GIT\-BRANCH" "1" "09/14/2022" "Git 2\&.37\&.3\&.662\&.g36f8e7" "Git Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -409,6 +409,140 @@ from a branch ref being shown and the object it points at\&. The format is the s .SH "CONFIGURATION" .sp \fBpager\&.branch\fR is only respected when listing branches, i\&.e\&., when \fB\-\-list\fR is used or implied\&. The default is to use a pager\&. See \fBgit-config\fR(1)\&. +.sp +Everything above this line in this section isn\(cqt included from the \fBgit-config\fR(1) documentation\&. The content that follows is the same as what\(cqs found there: +.PP +branch\&.autoSetupMerge +.RS 4 +Tells +\fIgit branch\fR, +\fIgit switch\fR +and +\fIgit checkout\fR +to set up new branches so that +\fBgit-pull\fR(1) +will appropriately merge from the starting point branch\&. Note that even if this option is not set, this behavior can be chosen per\-branch using the +\fB\-\-track\fR +and +\fB\-\-no\-track\fR +options\&. The valid settings are: +\fBfalse\fR \(em no automatic setup is done; +\fBtrue\fR \(em automatic setup is done when the starting point is a remote\-tracking branch; +\fBalways\fR \(em automatic setup is done when the starting point is either a local branch or remote\-tracking branch; +\fBinherit\fR \(em if the starting point has a tracking configuration, it is copied to the new branch; +\fBsimple\fR \(em automatic setup is done only when the starting point is a remote\-tracking branch and the new branch has the same name as the remote branch\&. This option defaults to true\&. +.RE +.PP +branch\&.autoSetupRebase +.RS 4 +When a new branch is created with +\fIgit branch\fR, +\fIgit switch\fR +or +\fIgit checkout\fR +that tracks another branch, this variable tells Git to set up pull to rebase instead of merge (see "branch\&.<name>\&.rebase")\&. When +\fBnever\fR, rebase is never automatically set to true\&. When +\fBlocal\fR, rebase is set to true for tracked branches of other local branches\&. When +\fBremote\fR, rebase is set to true for tracked branches of remote\-tracking branches\&. When +\fBalways\fR, rebase will be set to true for all tracking branches\&. See "branch\&.autoSetupMerge" for details on how to set up a branch to track another branch\&. This option defaults to never\&. +.RE +.PP +branch\&.sort +.RS 4 +This variable controls the sort ordering of branches when displayed by +\fBgit-branch\fR(1)\&. Without the "\-\-sort=<value>" option provided, the value of this variable will be used as the default\&. See +\fBgit-for-each-ref\fR(1) +field names for valid values\&. +.RE +.PP +branch\&.<name>\&.remote +.RS 4 +When on branch <name>, it tells +\fIgit fetch\fR +and +\fIgit push\fR +which remote to fetch from/push to\&. The remote to push to may be overridden with +\fBremote\&.pushDefault\fR +(for all branches)\&. The remote to push to, for the current branch, may be further overridden by +\fBbranch\&.<name>\&.pushRemote\fR\&. If no remote is configured, or if you are not on any branch and there is more than one remote defined in the repository, it defaults to +\fBorigin\fR +for fetching and +\fBremote\&.pushDefault\fR +for pushing\&. Additionally, +\fB\&.\fR +(a period) is the current local repository (a dot\-repository), see +\fBbranch\&.<name>\&.merge\fR\(aqs final note below\&. +.RE +.PP +branch\&.<name>\&.pushRemote +.RS 4 +When on branch <name>, it overrides +\fBbranch\&.<name>\&.remote\fR +for pushing\&. It also overrides +\fBremote\&.pushDefault\fR +for pushing from branch <name>\&. When you pull from one place (e\&.g\&. your upstream) and push to another place (e\&.g\&. your own publishing repository), you would want to set +\fBremote\&.pushDefault\fR +to specify the remote to push to for all branches, and use this option to override it for a specific branch\&. +.RE +.PP +branch\&.<name>\&.merge +.RS 4 +Defines, together with branch\&.<name>\&.remote, the upstream branch for the given branch\&. It tells +\fIgit fetch\fR/\fIgit pull\fR/\fIgit rebase\fR +which branch to merge and can also affect +\fIgit push\fR +(see push\&.default)\&. When in branch <name>, it tells +\fIgit fetch\fR +the default refspec to be marked for merging in FETCH_HEAD\&. The value is handled like the remote part of a refspec, and must match a ref which is fetched from the remote given by "branch\&.<name>\&.remote"\&. The merge information is used by +\fIgit pull\fR +(which at first calls +\fIgit fetch\fR) to lookup the default branch for merging\&. Without this option, +\fIgit pull\fR +defaults to merge the first refspec fetched\&. Specify multiple values to get an octopus merge\&. If you wish to setup +\fIgit pull\fR +so that it merges into <name> from another branch in the local repository, you can point branch\&.<name>\&.merge to the desired branch, and use the relative path setting +\fB\&.\fR +(a period) for branch\&.<name>\&.remote\&. +.RE +.PP +branch\&.<name>\&.mergeOptions +.RS 4 +Sets default options for merging into branch <name>\&. The syntax and supported options are the same as those of +\fBgit-merge\fR(1), but option values containing whitespace characters are currently not supported\&. +.RE +.PP +branch\&.<name>\&.rebase +.RS 4 +When true, rebase the branch <name> on top of the fetched branch, instead of merging the default branch from the default remote when "git pull" is run\&. See "pull\&.rebase" for doing this in a non branch\-specific manner\&. +.sp +When +\fBmerges\fR +(or just +\fIm\fR), pass the +\fB\-\-rebase\-merges\fR +option to +\fIgit rebase\fR +so that the local merge commits are included in the rebase (see +\fBgit-rebase\fR(1) +for details)\&. +.sp +When the value is +\fBinteractive\fR +(or just +\fIi\fR), the rebase is run in interactive mode\&. +.sp +\fBNOTE\fR: this is a possibly dangerous operation; do +\fBnot\fR +use it unless you understand the implications (see +\fBgit-rebase\fR(1) +for details)\&. +.RE +.PP +branch\&.<name>\&.description +.RS 4 +Branch description, can be edited with +\fBgit branch \-\-edit\-description\fR\&. Branch description is automatically added in the format\-patch cover letter or request\-pull summary\&. +.RE .SH "EXAMPLES" .PP Start development from a known tag |