Re: [PATCH v4 2/5] doc: add an UPSTREAM BRANCHES section to pull/push/fetch
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 30, 2025, 23:39 UTC
- Message-ID
- <xmqqtt0j33yq.fsf@gitster.g>
- In-Reply-To
- <69825d46349e55dd1b17444ab4e6d542fd44f371.1759262314.git.gitgitgadget@gmail.com>
"Julia Evans via GitGitGadget" <gitgitgadget@gmail.com> writes:
> +You can set an upstream branch explicitly with > +`git push --set-upstream <remote> <branch>` or `git branch --track`,
I am wondering if this confuses beginners, appearing as if the latter does not need any other command line arguments, as the former does say two pieces of information needs to be given.
Show 14 quoted lines
> +but Git will often automatically set the upstream for you, for example: > + > +* When you clone a repository, Git will automatically set the upstream > + for the default branch. > +* If you have the `push.autoSetupRemote` configuration option set, > + `git push` will automatically set the upstream the first time you push > + a branch. > +* Checking out a remote-tracking branch with `git checkout <branch>` > + will automatically create a local branch with that name and set > + the upstream to the remote branch. > + > +[NOTE] > +Upstream branches are sometimes referred to as "tracking information", > +as in "set the branch's tracking information".
Everything else looked great. Thanks for working on this.