X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=Documentation%2Fgit-push.txt;h=6150b1b959e17655a2875d39ec3b70449684a0eb;hb=ce8936c342a15a08029c71fdc92e283e3624bc18;hp=f3d5d883a7e4e42c47670eeeef41799b1cb0c228;hpb=78e996451b5aa5b38318aa613e1c713434c61dbb;p=git.git diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt index f3d5d883a..6150b1b95 100644 --- a/Documentation/git-push.txt +++ b/Documentation/git-push.txt @@ -9,8 +9,9 @@ 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 ----------- @@ -29,9 +30,9 @@ OPTIONS The "remote" repository that is destination of a push operation. See the section <> below. -:: +...:: The canonical format of a parameter is - `+?:`; that is, an optional plus `+`, followed + `+?:`; that is, an optional plus `{plus}`, followed by the source ref, followed by a colon `:`, followed by the destination ref. + @@ -100,13 +101,27 @@ 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:: - These options are passed to `git-send-pack`. Thin + These options are passed to 'git-send-pack'. Thin transfer spends extra cycles to minimize the number of objects to be sent and meant to be used on slower connection. @@ -180,11 +195,11 @@ git push origin :experimental:: Find a ref that matches `experimental` in the `origin` repository (e.g. `refs/heads/experimental`), and delete it. -git push origin master:satellite/master:: - Find a ref that matches `master` in the source repository - (most likely, it would find `refs/heads/master`), and update - the ref that matches `satellite/master` (most likely, it would - be `refs/remotes/satellite/master`) in `origin` repository with it. +git push origin master:satellite/master dev:satellite/dev:: + Use the source ref that matches `master` (e.g. `refs/heads/master`) + to update the ref that matches `satellite/master` (most probably + `refs/remotes/satellite/master`) in the `origin` repository, then + do the same for `dev` and `satellite/dev`. git push origin master:refs/heads/experimental:: Create the branch `experimental` in the `origin` repository @@ -195,7 +210,7 @@ git push origin master:refs/heads/experimental:: Author ------ -Written by Junio C Hamano , later rewritten in C +Written by Junio C Hamano , later rewritten in C by Linus Torvalds Documentation