Git
Português (Brasil) ▾Topics ▾Latest version ▾ git-send-pack last updated in 2.43.0

NOME

git-send-pack - Impulsiona (push) os objetos através do protocolo Git para um outro repositório

RESUMO

git send-pack [--mirror] [--dry-run] [--force]
		[--receive-pack=<git-receive-pack>]
		[--verbose] [--thin] [--atomic]
		[--[no-]signed | --signed=(true|false|if-asked)]
		[<host>:]<diretório> (--all | <ref>…​)

DESCRIÇÃO

No lugar utilize git push que é um wrapper de maior hierarquia deste comando. Consulte git-push[1].

Invoca o comando git-receive-pack num repositório possivelmente remoto e atualiza-o a partir do repositório atual, enviando determinados refs.

OPÇÕES

--receive-pack=<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.

--exec=<git-receive-pack>

O mesmo que --receive-pack=<git-receive-pack>.

--all

Em vez de definir de forma explicita quais são referências que devem ser atualizadas, atualize todos os cabeçalhos que existam localmente.

--stdin

Pegue a lista dos refs do stdin, um por linha. Caso haja refs utilizados na linha de comando, além desta opção, os refs do stdin serão processados após as da linha de comando.

Caso --stateless-rpc seja utilizado junto com esta opção, a lista de referências deverá estar no formato do pacote (linha-pkt). Cada ref deve estar num pacote separado e a lista deve terminar com um pacote liberado.

--dry-run

Faça tudo, exceto realmente enviar as atualizações.

--force

Usually, the command refuses to update a remote ref that is not an ancestor of the local ref used to overwrite it. This flag disables the check. This means that the remote repository can lose commits; use it with care.

--verbose

Rode de forma loquaz.

--thin

Envie um pacote "thin", que registra os objetos no formato "deltificado" com base nos objetos não inclusos no pacote para reduzir o tráfego de rede.

--atomic

Use uma transação atômica para atualizar as refs. Caso alguma das refs falhem na atualização, todo o "push" falhará sem alterar nenhuma das refs.

--[no-]signed
--signed=(true|false|if-asked)

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.

--push-option=<texto>

Pass the specified string as a push option for consumption by hooks on the server side. If the server doesn’t support push options, error out. See git-push[1] and githooks[5] for details.

<host>

A remote host to house the repository. When this part is specified, git-receive-pack is invoked via ssh.

<diretório>

O repositório que será atualizado.

<ref>…​

O ramo remoto refs que serão atualizados.

ESPECIFICANDO AS REFS

Existem três maneiras para definir quais as refs devem ser atualizadas na extremidade remota.

With the --all flag, all refs that exist locally are transferred to the remote side. You cannot specify any <ref> if you use this flag.

Sem --all e sem qualquer <ref>, os cabeçalhos existentes no lado local e no lado remoto são atualizadas.

When one or more <ref> are specified explicitly (whether on the command line or via --stdin), it can be either a single pattern, or a pair of such patterns separated by a colon ":" (this means that a ref name cannot have a colon in it). A single pattern <name> is just shorthand for <name>:<name>.

Each pattern pair consists of the source side (before the colon) and the destination side (after the colon). The ref to be pushed is determined by finding a match that matches the source side, and where it is pushed is determined by using the destination side. The rules used to match a ref are the same rules used by git rev-parse to resolve a symbolic ref name. See git-rev-parse[1].

  • É um erro caso <src> não corresponda exatamente a um dos refs locais.

  • É um erro caso <dst> coincida com mais de uma ref remota.

  • Caso <dst> não corresponda a nenhum ref remoto

    • é preciso iniciar com "refs/"; o <dst> é utilizado literalmente como destino neste caso.

    • <src> == <dst> e a referência que coincida com <src> não devem existir no conjunto de refs remotas; o "ref" que coincida com o <src> localmente é utilizado como o nome do destino.

Without --force, the <src> ref is stored at the remote only if <dst> does not exist, or <dst> is a proper subset (i.e. an ancestor) of <src>. This check, known as the "fast-forward check", is performed to avoid accidentally overwriting the remote ref and losing other people’s commits from there.

Com --force, a verificação do avanço rápido é desativado para todas as refs.

Opcionalmente, um parâmetro <ref> pode ser prefixado com um sinal de mais + para desativar a verificação de avanço rápido apenas nessa "ref".

GIT

Parte do conjunto git[1]

scroll-to-top