<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Git - 分类 - Victor's Code Journey</title><link>http://www.victorchu.info/categories/git/</link><description>Git - 分类 - Victor's Code Journey</description><generator>Hugo -- gohugo.io</generator><language>zh-cn</language><managingEditor>victorchu0610@outlook.com (victorchutian)</managingEditor><webMaster>victorchu0610@outlook.com (victorchutian)</webMaster><lastBuildDate>Wed, 08 Apr 2026 17:07:00 +0800</lastBuildDate><atom:link href="http://www.victorchu.info/categories/git/" rel="self" type="application/rss+xml"/><item><title>Git Worktree 并行开发</title><link>http://www.victorchu.info/posts/2026/04/c852edc8/</link><pubDate>Wed, 08 Apr 2026 17:07:00 +0800</pubDate><author><name>victorchutian</name></author><guid>http://www.victorchu.info/posts/2026/04/c852edc8/</guid><description><![CDATA[<div class="featured-image">
                <img src="/feature-images/git.webp" referrerpolicy="no-referrer">
            </div><p><code>git worktree</code> 命令支持管理同一个 git 仓库的多个工作区<sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup>,每个工作区可检出不同分支/提交。每个工作区都像一个“轻量级的独立仓库”，但它们共享底层对象库，减少磁盘占用并加速切换。</p>
<p>同一分支在同一时刻只能在一个 worktree 中被检出。如果想在多个 worktree 同时基于同一分支进行试验，需要使用不同分支名，或者使用<code>--detach</code>直接检出到某个提交。</p>
<blockquote>
  <p>注意，<code>--detach</code> 会产生分离式 HEAD，后续的修改会丢失，一般不推荐使用，除非是仅看用于查看代码。</p>

</blockquote>]]></description></item><item><title>git多账号通过ssh提交</title><link>http://www.victorchu.info/posts/2025/10/a40cdb91/</link><pubDate>Wed, 29 Oct 2025 14:18:01 +0800</pubDate><author><name>victorchutian</name></author><guid>http://www.victorchu.info/posts/2025/10/a40cdb91/</guid><description><![CDATA[<div class="featured-image">
                <img src="/feature-images/git.webp" referrerpolicy="no-referrer">
            </div><p>假设我有两个 github 账号，victor(for personal) 和 superman(for work)。如果我想在同一台电脑上使用这两个账号进行 git push/pull。该如何配置？</p>]]></description></item><item><title>git内部原理</title><link>http://www.victorchu.info/posts/2017/01/524a519e/</link><pubDate>Tue, 10 Jan 2017 16:08:31 +0800</pubDate><author><name>victorchutian</name></author><guid>http://www.victorchu.info/posts/2017/01/524a519e/</guid><description><![CDATA[<div class="featured-image">
                <img src="/feature-images/git.webp" referrerpolicy="no-referrer">
            </div><p>之前的文章介绍了 <a href="/posts/2017/01/7f091a13/" rel="">git的基础知识</a>和<a href="/posts/2016/11/d973b0bd/" rel="">git-flow模型</a>。本篇文章将深入了解下git的内部原理。</p>]]></description></item><item><title>Git Quickstart</title><link>http://www.victorchu.info/posts/2017/01/7f091a13/</link><pubDate>Mon, 09 Jan 2017 17:29:15 +0800</pubDate><author><name>victorchutian</name></author><guid>http://www.victorchu.info/posts/2017/01/7f091a13/</guid><description><![CDATA[<div class="featured-image">
                <img src="/feature-images/git.webp" referrerpolicy="no-referrer">
            </div><p>Git 是一个开源的分布式版本控制系统，Git 不仅仅是个版本控制系统，它也是个内容管理系统(CMS)，工作管理系统等。</p>]]></description></item><item><title>My Effective Git</title><link>http://www.victorchu.info/posts/2016/11/77645e9e/</link><pubDate>Wed, 23 Nov 2016 15:00:41 +0800</pubDate><author><name>victorchutian</name></author><guid>http://www.victorchu.info/posts/2016/11/77645e9e/</guid><description><![CDATA[<div class="featured-image">
                <img src="/feature-images/git.webp" referrerpolicy="no-referrer">
            </div><p>本文是关于git的使用技巧。</p>]]></description></item></channel></rss>