Re: [PATCH v4 5/5] doc: git-push: Add explanation of `git push origin main`
- From
D. Ben Knoble <ben.knoble@gmail.com>
- Date
- Oct 1, 2025, 22:29 UTC
- Message-ID
- <CALnO6CALtO_5Na-TyfuVK6p9A7Ufn7bVVMcizcxv+8hWmL=Mrg@mail.gmail.com>
- In-Reply-To
- <9435f0ce8db946b6b3462ef9923503ed359b3379.1759262314.git.gitgitgadget@gmail.com>
On Tue, Sep 30, 2025 at 3:58 PM Julia Evans via GitGitGadget <gitgitgadget@gmail.com> wrote:
Show 28 quoted lines
> > From: Julia Evans <julia@jvns.ca> > > What happens if you run `git push` without any arguments is actually > extremely complex to explain, as discussed in the previous commit. > > But it's very easy to explain what `git push <remote> <branch>` does, so > start the man page by explaining what that does. > > The hope is that someone could just stop reading the man page here and > never learn anything else about `git push`, and that would be fine. > > Signed-off-by: Julia Evans <julia@jvns.ca> > --- > Documentation/git-push.adoc | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/Documentation/git-push.adoc b/Documentation/git-push.adoc > index 2848cf2e1f..c0e743d4a8 100644 > --- a/Documentation/git-push.adoc > +++ b/Documentation/git-push.adoc > @@ -23,6 +23,10 @@ Updates one or more branches, tags, or other references in a remote > repository from your local repository, and sends all necessary data > that isn't already on the remote. > > +The simplest way to push is `git push <remote> <branch>`. > +`git push origin main` will push the local `main` branch to the `main` > +branch on the remote named `origin`.
Perhaps "For example," to avoid starting with punctuation/commands? I'm not sure if that kind of thing is actually confusing for readers or not, though. If not, I'll stop recommending such changes.
-- D. Ben Knoble