From: Julia Evans Date: Tue, 30 Sep 2025 19:58:34 +0000 (+0000) Subject: doc: git-push: add explanation of `git push origin main` X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=36f96becaff9f2fb2a142d34c3a46dbbfca667a3;p=thirdparty%2Fgit.git doc: git-push: add explanation of `git push origin main` 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 ` 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 Signed-off-by: Junio C Hamano --- diff --git a/Documentation/git-push.adoc b/Documentation/git-push.adoc index 5c5ef35472..f51a499bfa 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 `. +`git push origin main` will push the local `main` branch to the `main` +branch on the remote named `origin`. + The `` argument defaults to the upstream for the current branch, or `origin` if there's no configured upstream.