git push [remote] [branch]

Update remote refs

Arguments

NameDescription
remote
branch

Options

NameDescription
--allPush all branches (i.e. refs under refs/heads/); cannot be used with other <refspec>
--pruneRemove remote branches that don't have a local counterpart
--mirrorInstead of naming each ref to push, specifies that all refs under refs/ be mirrored to the remote repository
-n, --dry-runDo everything except actually send the updates
--porcelainProduce machine-readable output. The output status line for each ref will be tab-separated and sent to stdout instead of stderr
-d, --deleteAll listed refs are deleted from the remote repository. This is the same as prefixing all refs with a colon
--tagsAll refs under refs/tags are pushed, in addition to refspecs explicitly listed on the command line
--follow-tagsPush all the refs that would be pushed without this option, and also push annotated tags in refs/tags that are missing from the remote but are pointing at commit-ish that are reachable from the refs being pushed. This can also be specified with configuration variable push.followTags
--signed [arg]GPG-sign the push request to update refs on the receiving side, to allow it to be checked by the hooks and/or be logged. If false or --no-signed, no signing will be attempted. If true or --signed, the push will fail if the server does not support signed pushes. If set to if-asked, sign if and only if the server supports signed pushes. The push will also fail if the actual call to gpg --sign fails. See git-receive-pack(1) for the details on the receiving end
--no-signedGPG-sign the push request to update refs on the receiving side, to allow it to be checked by the hooks and/or be logged. If false or --no-signed, no signing will be attempted. If true or --signed, the push will fail if the server does not support signed pushes. If set to if-asked, sign if and only if the server supports signed pushes. The push will also fail if the actual call to gpg --sign fails. See git-receive-pack(1) for the details on the receiving end
--atomicUse an atomic transaction on the remote side if available. Either all refs are updated, or on error, no refs are updated. If the server does not support atomic pushes the push will fail
--no-atomicUse an atomic transaction on the remote side if available. Either all refs are updated, or on error, no refs are updated. If the server does not support atomic pushes the push will fail
-f, --forceUsually, the command refuses to update a remote ref that is not an ancestor of the local ref used to overwrite it. Also, when --force-with-lease option is used, the command refuses to update a remote ref whose current value does not match what is expected. This flag disables these checks, and can cause the remote repository to lose commits; use it with care
--repo <repository>This option is equivalent to the <repository> argument. If both are specified, the command-line argument takes precedence
-u, --set-upstreamFor every branch that is up to date or successfully pushed, add upstream (tracking) reference, used by argument-less git-pull(1) and other commands
--thinThese options are passed to git-send-pack(1). A thin transfer significantly reduces the amount of sent data when the sender and receiver share many of the same objects in common. The default is --thin
--no-thinThese options are passed to git-send-pack(1). A thin transfer significantly reduces the amount of sent data when the sender and receiver share many of the same objects in common. The default is --thin
-q, --quietSuppress all output, including the listing of updated refs, unless an error occurs. Progress is not reported to the standard error stream
-v, --verboseRun verbosely
--progressProgress status is reported on the standard error stream by default when it is attached to a terminal, unless -q is specified. This flag forces progress status even if the standard error stream is not directed to a terminal
--no-recurse-submodulesMay be used to make sure all submodule commits used by the revisions to be pushed are available on a remote-tracking branch. If check is used Git will verify that all submodule commits that changed in the revisions to be pushed are available on at least one remote of the submodule. If any commits are missing the push will be aborted and exit with non-zero status. If on-demand is used all submodules that changed in the revisions to be pushed will be pushed. If on-demand was not able to push all necessary revisions it will also be aborted and exit with non-zero status. If only is used all submodules will be recursively pushed while the superproject is left unpushed. A value of no or using --no-recurse-submodules can be used to override the push.recurseSubmodules configuration variable when no submodule recursion is required
--recurse-submodules <arg>May be used to make sure all submodule commits used by the revisions to be pushed are available on a remote-tracking branch. If check is used Git will verify that all submodule commits that changed in the revisions to be pushed are available on at least one remote of the submodule. If any commits are missing the push will be aborted and exit with non-zero status. If on-demand is used all submodules that changed in the revisions to be pushed will be pushed. If on-demand was not able to push all necessary revisions it will also be aborted and exit with non-zero status. If only is used all submodules will be recursively pushed while the superproject is left unpushed. A value of no or using --no-recurse-submodules can be used to override the push.recurseSubmodules configuration variable when no submodule recursion is required
--verifyTurn on the pre-push hook. The default is --verify, giving the hook a chance to prevent the push. With
--no-verifyTurn off the pre-push hook. The default is --verify, giving the hook a chance to prevent the push. With
-4, --ipv4Use IPv4 addresses only, ignoring IPv6 addresses
-6, --ipv6Use IPv6 addresses only, ignoring IPv4 addresses
-o, --push-option <option>Transmit the given string to the server, which passes them to the pre-receive as well as the post-receive hook. The given string must not contain a NUL or LF character. When multiple --push-option=<option> are given, they are all sent to the other side in the order listed on the command line. When no --push-option=<option> is given from the command line, the values of configuration variable push.pushOption are used instead
--receive-pack, --exec <git-receive-pack>Path to the git-receive-pack program on the remote end. Sometimes useful when pushing to a remote repository over ssh, and you do not have the program in a directory on the default $PATH
--no-force-with-leaseCancel all the previous --force-with-lease on the command line
--force-with-lease [refname[:expect]]Protect the named ref (alone), if it is going to be updated, by requiring its current value to be the same as the specified value <expect> (which is allowed to be different from the remote-tracking branch we have for the refname, or we do not even have to have such a remote-tracking branch when this form is used). If <expect> is the empty string, then the named ref must not already exist