X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=Documentation%2Fgit-push.txt;h=6150b1b959e17655a2875d39ec3b70449684a0eb;hb=5fdb70983585ccde1540563a8c7458621f7a7407;hp=45c96435fa66ab4b1b57b6a860a2fc264321cfe4;hpb=b805ef08e691299478b0d0c843eeab3f066c5872;p=git.git diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt index 45c96435f..6150b1b95 100644 --- a/Documentation/git-push.txt +++ b/Documentation/git-push.txt @@ -9,8 +9,8 @@ git-push - Update remote refs along with associated objects SYNOPSIS -------- [verse] -'git push' [--all] [--dry-run] [--tags] [--receive-pack=] - [--repo=all] [-f | --force] [-v | --verbose] +'git push' [--all | --mirror] [--dry-run] [--tags] [--receive-pack=] + [--repo=] [-f | --force] [-v | --verbose] [ ...] DESCRIPTION @@ -101,9 +101,23 @@ nor in any Push line of the corresponding remotes file---see below). This flag disables the check. This can cause the remote repository to lose commits; use it with care. ---repo=:: - When no repository is specified the command defaults to - "origin"; this overrides it. +--repo=:: + This option is only relevant if no argument is + passed in the invocation. In this case, 'git-push' derives the + remote name from the current branch: If it tracks a remote + branch, then that remote repository is pushed to. Otherwise, + the name "origin" is used. For this latter case, this option + can be used to override the name "origin". In other words, + the difference between these two commands ++ +-------------------------- +git push public #1 +git push --repo=public #2 +-------------------------- ++ +is that #1 always pushes to "public" whereas #2 pushes to "public" +only if the current branch does not track a remote branch. This is +useful if you write an alias or script around 'git-push'. --thin:: --no-thin::