Skip to content

Commit b1fc588

Browse files
committed
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 <[email protected]>
1 parent a3ae71f commit b1fc588

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Documentation/git-push.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ Updates one or more branches, tags, or other references in a remote
2323
repository from your local repository, and sends all necessary data
2424
that isn't already on the remote.
2525

26+
The simplest way to push is `git push <remote> <branch>`.
27+
`git push origin main` will push the local `main` branch to the `main`
28+
branch on the remote named `origin`.
29+
2630
The `<repository>` argument defaults to the upstream for the current branch,
2731
or `origin` if there's no configured upstream.
2832

0 commit comments

Comments
 (0)