<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Roxy Chen on Medium]]></title>
        <description><![CDATA[Stories by Roxy Chen on Medium]]></description>
        <link>https://medium.com/@chenchanghao?source=rss-b781486ac55f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Hh1nv6LtDooW9ieJrw4Ung@2x.jpeg</url>
            <title>Stories by Roxy Chen on Medium</title>
            <link>https://medium.com/@chenchanghao?source=rss-b781486ac55f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 04:16:50 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@chenchanghao/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Tig- CLI 版的 Sourcetree]]></title>
            <link>https://medium.com/@chenchanghao/tig-cli-%E7%89%88%E7%9A%84-sourcetree-2ea39b396d95?source=rss-b781486ac55f------2</link>
            <guid isPermaLink="false">https://medium.com/p/2ea39b396d95</guid>
            <category><![CDATA[cli]]></category>
            <category><![CDATA[terminal]]></category>
            <category><![CDATA[git]]></category>
            <dc:creator><![CDATA[Roxy Chen]]></dc:creator>
            <pubDate>Mon, 01 Apr 2019 18:57:43 GMT</pubDate>
            <atom:updated>2019-04-01T19:00:45.275Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Mf__I40H7VCwTRR-H1bHvQ.jpeg" /></figure><h3>什麼是 Tig</h3><p>Tig 是 Git browser 的一種<br>除了可以比原生 git 秀出更詳細的 log 之外他針對.git操作的方式也可以更多元<br>簡單說 Tig 就像 CLI版的Sourcetree，可以以視覺化方式在 Terminal 操作 Git 的工具。 雖然Git 本身已經就擁有 interactive mod 這些具便利性的指令，但是 Tig 這隻工具有提供更多方式讓你可以用更進階的方式去修改你的Git commit。</p><h3>安裝方式</h3><h4>macOS 透過 Homebrew 安裝</h4><pre>brew update<br>brew install tig</pre><h4>Ubuntu 透過 apt-get 安裝</h4><pre>sudo apt-get update<br>sudo apt-get install tig</pre><h3>基本操作</h3><p>在已經 git init 過的專案底下輸入 tig<br>就可以直接進入Tig 的main view <br>來查看當前git的commit<br>可以上下切換commit 後 enter 查看當前commit 的diff<br>在diff view 底下按q則可離開diff view<br>回到main view 後 按t 則會進入tree view</p><h3>利用Tree view 來快速切換要檢視的Branch</h3><p>通常在git 底下是必需先checkout 的<br>但是在tig可以直接查看指定branch 底下的commit <br>不管在哪一個view底下都可以用大寫的S來 切換到status view 底下 並用u 加入指定的檔案到這次的commit 中</p><p>最後<br>如果專案沒有任何commit 紀錄 tig 是會報錯的</p><pre>tig: No revisions match the given arguments.</pre><p>這時候還是可以透過tig 來增加commit <br>只要直接執行tig status 然後再按 `u `來新增檔案即可</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2ea39b396d95" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>