]> git.ipfire.org Git - thirdparty/git.git/commitdiff
doc: git-push: add explanation of `git push origin main`
authorJulia Evans <julia@jvns.ca>
Mon, 6 Oct 2025 18:58:51 +0000 (18:58 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 6 Oct 2025 21:30:34 +0000 (14:30 -0700)
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>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-push.adoc

index 484aa9025ed9ede4e8ac3de169abe876a31e1df8..f187fd59342657932d4a4f1da7c82437155c765e 100644 (file)
@@ -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`.
+
 The `<repository>` argument defaults to the upstream for the current branch,
 or `origin` if there's no configured upstream.