doc: update docs/git.md 145bdf9119

This commit is contained in:
jaywcjlove
2024-07-18 09:15:17 +00:00
parent 0d1c226d30
commit db514dbe8d
4 changed files with 17 additions and 10 deletions

View File

@ -116,6 +116,9 @@
<p>删除名为 <code>my_branch</code> 的分支</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line">$ <span class="token function">git</span> branch <span class="token parameter variable">-d</span> my_branch
</span></code></pre>
<p>删除本地存在远程不存在的分支</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line">$ <span class="token function">git</span> remote prune origin
</span></code></pre>
<p>将分支 <code>A</code> 合并到分支 <code>B</code></p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line">$ <span class="token function">git</span> checkout branchB
</span><span class="code-line">$ <span class="token function">git</span> merge branchA
@ -426,7 +429,8 @@
</div></div></div><div class="wrap h3body-not-exist"><div class="wrap-header h3wrap"><h3 id="commit-历史中显示-branch1-有的但是-branch2-没有-commit"><a aria-hidden="true" tabindex="-1" href="#commit-历史中显示-branch1-有的但是-branch2-没有-commit"><span class="icon icon-link"></span></a>commit 历史中显示 Branch1 有的但是 Branch2 没有 commit</h3><div class="wrap-body">
<pre class="language-bash"><code class="language-bash code-highlight"><span class="code-line">$ <span class="token function">git</span> log Branch1 ^Branch2
</span></code></pre>
</div></div></div><div class="wrap h3body-not-exist"><div class="wrap-header h3wrap"><h3 id="git-迁移"><a aria-hidden="true" tabindex="-1" href="#git-迁移"><span class="icon icon-link"></span></a>git 迁移</h3><div class="wrap-body">
</div></div></div><div class="wrap h3body-not-exist col-span-2"><div class="wrap-header h3wrap"><h3 id="git-迁移"><a aria-hidden="true" tabindex="-1" href="#git-迁移"><span class="icon icon-link"></span></a>git 迁移</h3><div class="wrap-body">
<!--rehype:wrap-class=col-span-2-->
<ul>
<li>从原地址克隆一份裸版本库</li>
</ul>
@ -765,7 +769,8 @@
</span><span class="code-line"> ProxyCommand <span class="token function">nc</span> <span class="token parameter variable">-X</span> <span class="token number">5</span> <span class="token parameter variable">-x</span> <span class="token number">127.0</span>.0.1:1080 %h %p
</span></code></pre>
<!--rehype:className=wrap-text-->
</div></div></div><div class="wrap h3body-not-exist"><div class="wrap-header h3wrap"><h3 id="fork仓库同步上游仓库"><a aria-hidden="true" tabindex="-1" href="#fork仓库同步上游仓库"><span class="icon icon-link"></span></a>Fork仓库同步上游仓库</h3><div class="wrap-body">
</div></div></div><div class="wrap h3body-not-exist col-span-2"><div class="wrap-header h3wrap"><h3 id="fork仓库同步上游仓库"><a aria-hidden="true" tabindex="-1" href="#fork仓库同步上游仓库"><span class="icon icon-link"></span></a>Fork仓库同步上游仓库</h3><div class="wrap-body">
<!--rehype:wrap-class=col-span-2-->
<ul class="style-timeline">
<li>
<p>设置上游仓库</p>