uTools-Manuals/docs/git/git http-push.html
2019-05-07 10:40:55 +08:00

1 line
4.9 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<div class="c-markdown doc-markdown"><div class="doc-postil"><div class="c-markdown"><h2>名称</h2></div></div><div class="doc-postil"><div class="c-markdown"><p>git-http-push  - 通过 HTTP / DAV 将对象推送到另一个存储库</p></div></div><div class="doc-postil"><div class="c-markdown"><h2>概要</h2></div></div><div class="doc-postil"><div class="c-markdown"><pre><code class="language-Bash">git http-push [--all] [--dry-run] [--force] [--verbose] &lt;url&gt; &lt;ref&gt; [&lt;ref&gt;…]</code></pre></div></div><div class="doc-postil"><div class="c-markdown"><h2>描述</h2></div></div><div class="doc-postil"><div class="c-markdown"><p>将缺失的对象发送到远程存储库,并更新远程分支。</p></div></div><div class="doc-postil"><div class="c-markdown"><p><strong>注意</strong>:如果您的 libcurl 早于7.16,则此命令将暂时禁用,因为组合报告不起作用,有时会损坏存储库。</p></div></div><div class="doc-postil"><div class="c-markdown"><h2>选项</h2></div></div><div class="doc-postil"><div class="c-markdown"><p>--all</p></div></div><div class="doc-postil"><div class="c-markdown"><p>不要认为远程存储库在当前状态下是完整的并且验证整个本地ref的历史中的所有对象都存在于远程存储库中。</p></div></div><div class="doc-postil"><div class="c-markdown"><p>--force</p></div></div><div class="doc-postil"><div class="c-markdown"><p>通常,该命令拒绝更新远程 ref该远程 ref 不是用于覆盖它的本地 ref 的祖先。此标志禁用检查。这意味着远程仓库可能会失去提交; 小心使用它。</p></div></div><div class="doc-postil"><div class="c-markdown"><p>--dry-run</p></div></div><div class="doc-postil"><div class="c-markdown"><p>除了实际发送更新之外,请做其他事</p></div></div><div class="doc-postil"><div class="c-markdown"><p>--verbose</p></div></div><div class="doc-postil"><div class="c-markdown"><p>报告本地行走的对象列表以及成功发送到远程存储库的对象列表。</p></div></div><div class="doc-postil"><div class="c-markdown"><p>-d   -D</p></div></div><div class="doc-postil"><div class="c-markdown"><p>从远程存储库中删除&lt;ref&gt;。指定的分支不能是远程 HEAD。如果指定-d则还必须满足以下其他条件</p></div></div><div class="doc-postil"><div class="c-markdown"><ul class="ul-level-0 list-paddingleft-2" style="margin: 10px 0px 10px 20px;"><li><p>远程 HEAD 必须解析为本地存在的对象</p></li><li><p>指定的分支解析为本地存在的对象</p></li><li><p>指定的分支是远程 HEAD 的祖先</p></li></ul></div></div><div class="doc-postil"><div class="c-markdown"><p>&lt;ref&gt;</p></div></div><div class="doc-postil"><div class="c-markdown"><p>远程参考更新。</p></div></div><div class="doc-postil"><div class="c-markdown"><h2>指定参考</h2></div></div><div class="doc-postil"><div class="c-markdown"><p><code>&lt;ref&gt;</code>规范可以是一个单一的图案,或一对用冒号分开这样的图案的“:”(这意味着一个裁判名不能在它一个冒号)。一个模式<code>&lt;name&gt;</code>只是一个<code>&lt;name&gt;:&lt;name&gt;</code>简写。</p></div></div><div class="doc-postil"><div class="c-markdown"><p>每个模式对由源端(冒号前)和目标端(冒号后)组成。要推送的引用是通过找到匹配源端的匹配来确定的,并且推送的位置由目标端确定。</p></div></div><div class="doc-postil"><div class="c-markdown"><ul class="ul-level-0 list-paddingleft-2" style="margin: 10px 0px 10px 20px;"><li><p>如果&lt;src&gt;不完全匹配一个本地引用,那是错误的。</p></li><li><p>如果&lt;dst&gt;与任何远程参考不匹配</p></li></ul></div></div><div class="doc-postil"><div class="c-markdown"><pre class="prism-token token language-js">-  it has to start with "refs/"; &lt;dst&gt; is used as the destination literally in this case.</pre></div></div><div class="doc-postil"><div class="c-markdown"><pre class="prism-token token language-js">-  &lt;src&gt; == &lt;dst&gt; and the ref that matched the &lt;src&gt; must not exist in the set of remote refs; the ref matched &lt;src&gt; locally is used as the name of the destination.</pre></div></div><div class="doc-postil"><div class="c-markdown"><p>如果没有<code>--force</code>&lt;src&gt; ref 仅在&lt;dst&gt;不存在的情况下存储在远程,或者&lt;dst&gt;&lt;src&gt;的真子集(即祖先)。此检查称为“快进检查”,以避免意外覆盖远程参考并丢失其他人的提交。</p></div></div><div class="doc-postil"><div class="c-markdown"><p><code>--force</code>,所有裁判都禁用快进检查。</p></div></div><div class="doc-postil"><div class="c-markdown"><p>可选地,一个&lt;ref&gt;参数可以带有加<code>+</code>号前缀以禁用仅在该 ref 上的快进检查。</p></div></div></div>