aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorJulia Evans <julia@jvns.ca>2025-10-06 18:58:51 +0000
committerJunio C Hamano <gitster@pobox.com>2025-10-06 14:30:34 -0700
commita72504fe051272227f4097e8d664a9b7d871ec25 (patch)
tree82388f87e4c5f0551ecfc8dd7e27045b353fb62d /Documentation
parent6e1688f1f462d7a704bbcc1dae612488b7ac6e29 (diff)
downloadgit-a72504fe051272227f4097e8d664a9b7d871ec25.tar.gz
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 <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>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/git-push.adoc4
1 files changed, 4 insertions, 0 deletions
diff --git a/Documentation/git-push.adoc b/Documentation/git-push.adoc
index 484aa9025e..f187fd5934 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`.
+
The `<repository>` argument defaults to the upstream for the current branch,
or `origin` if there's no configured upstream.