<?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 Dino Wang on Medium]]></title>
        <description><![CDATA[Stories by Dino Wang on Medium]]></description>
        <link>https://medium.com/@dinowang?source=rss-b48b33672114------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*lvgY9rWsHDy7CYczsMMQdQ.jpeg</url>
            <title>Stories by Dino Wang on Medium</title>
            <link>https://medium.com/@dinowang?source=rss-b48b33672114------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 01:10:21 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@dinowang/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[四國瀨戶內海｜從 424 支影片到 6 天精華剪輯的旅程]]></title>
            <link>https://dinowang.medium.com/%E5%9B%9B%E5%9C%8B%E7%80%A8%E6%88%B6%E5%85%A7%E6%B5%B7-%E5%BE%9E-424-%E6%94%AF%E5%BD%B1%E7%89%87%E5%88%B0-6-%E5%A4%A9%E7%B2%BE%E8%8F%AF%E5%89%AA%E8%BC%AF%E7%9A%84%E6%97%85%E7%A8%8B-f517f283cfa8?source=rss-b48b33672114------2</link>
            <guid isPermaLink="false">https://medium.com/p/f517f283cfa8</guid>
            <category><![CDATA[japan]]></category>
            <category><![CDATA[video-production]]></category>
            <category><![CDATA[travel]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[motorcycle]]></category>
            <dc:creator><![CDATA[Dino Wang]]></dc:creator>
            <pubDate>Mon, 20 Apr 2026 06:26:00 GMT</pubDate>
            <atom:updated>2026-04-20T13:07:31.728Z</atom:updated>
            <content:encoded><![CDATA[<blockquote><em>2026–04–19 ~ 04–20 記錄</em></blockquote><h3>起因</h3><p>2026 年 3 月底，我獨自騎車完成了 12 天的四國・瀨戶內海之旅，扣掉兩天最後留在大阪消費和回程準備，共 10 天大約騎了 1700km，這次可說是相當克制距離的部分 😃。Insta360 ONE RS 掛在安全帽或身上全程錄影，回來後硬碟裡躺著 424 支 VID 檔和 424 支 LRV 低解析度 proxy — — 將近 850 個檔案、數十小時的素材。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*255mYBas-AtocbsNjSowiQ.png" /><figcaption>安裝 Insta360 ONE RS 的 Shoei Z-8 安全帽</figcaption></figure><p>全都是山路、櫻花、橋、海，美是美，但光看檔名就頭痛。手動剪？我大概看了三支就放棄了。</p><p>於是我決定讓 AI 來幫我，全程使用 GitHub Copilot + Claude Opus 4.6。</p><h3>第一刀：讓機器理解「哪裡值得看」</h3><p>我的 GitHub 倉庫 motor-travel 裡已經有這趟旅行的所有結構化資料：</p><ul><li><a href="http://travel-plan.md/"><strong>travel-plan.md</strong></a> — 每日行程規劃（景點、餐廳、住宿）</li><li><strong>timeline.json</strong> — 從 Google Timeline 匯出的 GPS 軌跡，每個停留點都有 placeId 和我們後來用 Places API 查回來的 placeName</li><li><strong>424 支影片</strong> — 存在 NAS 上</li></ul><p>工具是我自己寫的 video-reproducer，核心邏輯很單純：</p><ol><li><strong>用 timeline.json 對齊影片時間</strong> — 每支影片的檔名就是錄影開始時間（VID_20260329_131959），跟 Google Timeline 的 visit 時間交叉比對</li><li><strong>造訪地點</strong>：短停留（≤90 秒）完整保留，長停留取「到着前 30 秒 + 出発後 30 秒」</li><li><strong>騎行路段</strong>：每 2 分鐘一個候選窗口，用場景分析評分，取 Top 3</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/758/1*wLJUp9hqi6OlSEWo8YH3Xg.png" /><figcaption>我也會利用 OpenStreetMap 和 Google Timeline 的匯出資料繪製當次旅行的完整路徑和訪問點</figcaption></figure><p>第一次跑的時候我設了剪輯重點：櫻花 &gt; 山路彎道 &gt; 寺廟城堡 &gt; 海景。</p><p>工具掃了 NAS 上的 LRV 檔案（低解析度 proxy，掃描快），逐一做場景分析 — — 色彩偵測（找櫻花粉）、語音偵測（我有沒有在說話）、彎道偵測（地平線傾斜變化）。</p><p>6 天影片，一口氣跑完。每天產出一個 Shotcut MLT 預覽檔，我可以直接打開確認。</p><h3>第二刀：修正時序和補充遺漏</h3><h3>大久野島的兔子呢？</h3><p>Day 6 是しまなみ海道那天，我中途搭渡輪去了大久野島（兔子島），在島上待了快 3 小時，相機掛脖子上錄了不少跟兔子互動的畫面。但自動剪輯完全沒選到 — — 因為在島上沒有騎車，timeline 歸類為「長停留」，只取了到着和出発各 30 秒。</p><p>我跟 Copilot 說「Day 6 沒有剪入大久野島上與兔子玩耍的非機車活動」，它從 timeline.json 裡找到大久野島的兩段停留（09:3411:31、11:4912:53），比對出 13 支影片檔案，先用 LRV 串接出一個 354MB 的預覽讓我確認。</p><h3>平交道出現兩次？</h3><p>確認要加入兔子島後，第一版的串接出了問題 — — 「忠海港到着」的裁剪片段和兔子島完整檔案有重疊（同一支 095902_089.mp4，一個是 4s~44s 裁剪版，一個是完整版），導致平交道場景出現兩次、時序倒退。</p><p>修正很簡單：移除原本的「忠海港到着」裁剪片段，讓 13 支兔子島影片按時間自然串接。重建後預覽確認，沒有重複了。</p><h3>四萬十川的鋼索遊戲？</h3><p>Day 4 我在四萬十川玩了鋼索過河（ジップライン），相機當時掛脖子上。我興沖沖地跟 Copilot 說「能剪進去嗎？」，它從 timeline 找到了 四万十川ジップラインゴール地点（13:13~14:17），對應到 6 支影片。</p><p>串接預覽後……我忘了按錄影。那 6 支檔案的時間戳確實對得上，但內容大概是在口袋裡錄到的黑畫面。</p><p>「放棄，我忘了錄影」 — — 清理掉預覽檔，Day 4 維持原版。</p><h3>第三刀：AI 場景標籤</h3><p>內建的 numpy 分析能抓色彩、語音、彎道，但有些東西它看不出來：</p><ul><li>祖谷のかずら橋是不是「地標」？</li><li>夕陽時分的光線變化？</li><li>しまなみ海道的橋是不是該多拍一點？</li></ul><p>後來 video-scene-tagger 工具完成了，用 Google Gemini Flash 對每 10 秒的影片抽幀分析，產出結構化標籤。Day 2 掃完後有 544 個 segments，偵測到：</p><p>標籤數量🏔 山景129🏡 鄉村132🏍 彎道60🪧 標誌71🌸 櫻花16🌉 橋樑9⛩️ 地標3</p><p>把 scenes.json 丟給 video-reproducer 重剪，差異立刻出來：</p><ul><li>祖谷附近的兩段騎行多了 🌉 橋樑標籤</li><li>更多路段的彎道被 AI 確認（本來只靠 Sobel 邊緣偵測容易漏）</li><li>20km 路段的 #2 片段換了一支評分更高的檔案</li></ul><p>改善不是翻天覆地，但選出來的片段確實更精準了。</p><h3>最終成果</h3><p>6 天的影片全部剪完，每天一支 4K MP4：</p><p>Day日期長度大小路線23/2914:508.3G德島→祖谷→かずら橋→小便小僧33/304:412.6G四國喀斯特→カルストテラス43/3110:045.6G桂濱→四萬十川→松山64/214:188.0Gしまなみ海道 + 🐰大久野島74/38:114.6G岡山→姬路94/55:513.3G淡路島→大阪</p><p>合計 57 分 55 秒、32.4 GB。</p><p>每天同時產出：</p><ul><li><strong>MLT</strong> — Shotcut 可開啟的剪輯專案（LRV 預覽版 + VID 4K 版）</li><li><strong>metadata.json</strong> — 每個片段的座標、時間、標籤</li><li><strong>chapters.txt</strong> — YouTube 章節標記，直接貼到影片說明欄</li><li><strong>EDL / FCPXML</strong> — 其他剪輯軟體的匯入格式</li></ul><h3>工具鏈</h3><p>整個流程用到的工具：</p><pre>Google Timeline (時間軸.json)<br>    ↓ 匯出 + placeId→placeName (Google Places API)<br>timeline.json<br>    ↓<br>video-scene-tagger (Gemini Flash AI)<br>    ↓ 產出 scenes.json<br>video-reproducer (numpy + ffmpeg + AI scenes)<br>    ↓ 場景分析 + 評分 + MLT 產生<br>    ↓<br>Shotcut (人工確認預覽)<br>    ↓<br>ffmpeg concat (4K MP4 串接)<br>    ↓<br>最終影片</pre><p>關鍵決策都是人做的：要不要加兔子島、鋼索那段要不要放棄、剪輯重點的優先順序。AI 負責的是把數十小時的素材縮到可管理的範圍，讓我只需要看 15 分鐘的預覽就能做決定。</p><h3>學到的事</h3><ol><li><strong>Google Timeline 是最好的影片索引</strong> — 不需要任何手動標記，GPS 軌跡天然對應到「這段時間在哪裡、停了多久」</li><li><strong>placeName 很重要</strong> — 早期我們花了一輪 API 呼叫把 279 個 Timeline 裡的 placeId 轉成地名，現在每個片段的標籤都是人看得懂的「祖谷のかずら橋」而不是 ChIJ...，這一步為 Timeline 原始資料加值也避免了反覆呼叫 API (歷史只會出現一次)</li><li><strong>LRV proxy 是救贖</strong> — NAS 上的 4K 檔案太大，用低解析度 proxy 做分析和預覽，最後才用 VID 原檔 copy 模式串接，不重新編碼</li><li><strong>ONE RS 的限制反而成了簡潔</strong> — Insta360 ONE RS 算是被淘汰的產品線，某一次韌體更新後他們移除了在我這個產品上更豐富 metadata 格式的錄影存檔支援，只給了純 .mp4。沒有 bookmark、沒有 GPS 軌跡內嵌、沒有 Insta360 專屬格式。但也正因為只剩下檔名裡的時間戳，反而跟 Google Timeline 完美呼應——不需要解析任何私有格式，一個 VID_20260329_131959 就是一切的起點</li><li><strong>AI 場景標籤是最後才想到的，但價值最高</strong> — 最初我只用 numpy 做色彩和邊緣偵測，直到所有天數都剪完一輪後才回頭嘗試 Gemini Flash 預掃描。結果每 5 秒抽幀一次就補足了大量純演算法無法辨識的細節：寺廟是「地標」、かずら橋是「橋樑」、傍晚的光線是「夕陽」。成本約 $1.3/天，完全值得。<strong>之後處理影片一律先做一次 AI 預掃描</strong>，這已經成為工作流程的標準步驟</li><li><strong>自動初剪不是最終剪</strong> — 它是「把 850 個檔案縮成 30 個值得看的片段」的工具，最後還是要人確認。但這已經省下了 95% 的時間</li></ol><p>下次旅行回來，我只需要：匯出 Timeline → 跑一個指令 → 看預覽 → 確認 → 出片。</p><p>整個流程，從 850 個檔案到 6 支成品，大約花了一個下午。</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f517f283cfa8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Accelerate Azure CLI extensions upgrade]]></title>
            <link>https://dinowang.medium.com/accelerate-azure-cli-extensions-upgrade-c5c24d6053ec?source=rss-b48b33672114------2</link>
            <guid isPermaLink="false">https://medium.com/p/c5c24d6053ec</guid>
            <category><![CDATA[bash]]></category>
            <category><![CDATA[azure-cli]]></category>
            <category><![CDATA[azure]]></category>
            <dc:creator><![CDATA[Dino Wang]]></dc:creator>
            <pubDate>Tue, 03 Sep 2024 06:47:55 GMT</pubDate>
            <atom:updated>2024-09-03T16:54:14.971Z</atom:updated>
            <content:encoded><![CDATA[<p>Azure CLI extensions batch upgrade costs a lot of time. Let’s leverage shell scripts to accelerate it.</p><h3>Problem</h3><p>As a cutting-edge Azure CLI user. Some features weren’t built-in module that require Azure CLI extension to load additional extensions. Since most additional modules were preview or experimental version, extension upgrade may come frequently.</p><p>In official Azure CLI extension upgrade process. We use below command to upgrade:</p><pre>az extension update --name &lt;&lt;extension-name&gt;&gt;</pre><p>If you have a bunch of extensions. Azure CLI Also provide command for upgrade those extensions at once.</p><pre>az upgrade --all</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JEe12DvQ_yEZi2vqiYDm5w.png" /><figcaption>az upgrade</figcaption></figure><p>But when you are upgrading extensions by using az upgrade. You usually find the worst efficiency one-by-one version check, which costs a lot of time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PICnnivXD1PA0jwq-_k0ZA.png" /><figcaption>Upgrade all Azure CLI installed extensions was case one-by-one version checking</figcaption></figure><h3>Solution</h3><p>In fact, you can find available extensions with it’s version number online. And also Azure CLI will tell you that was installed on your machine.</p><pre>az extension list-available</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ldh5H-PytmkMJXGFFqVDww.png" /><figcaption>Listing all available Azure CLI extensions with latest version</figcaption></figure><p>Installed extensions can find by another command</p><pre>az extension list</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LhXSJk8tNt1p5zA5P2E0tA.png" /><figcaption>Listing installed Azure CLI extensions with its version</figcaption></figure><p>With combined online version and installed version. Find outdated Azure CLI extension can be accelerated with lightweight version checking.</p><h3>Bash Approach</h3><p>Following is bash script, Leverage jq to reorganize two JSON results from previous commands. So we can find outdated extensions from metadata.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/721c4c692290d909f9b085f99f110970/href">https://medium.com/media/721c4c692290d909f9b085f99f110970/href</a></iframe><p>You can place it into .bashrc (or .zshrc), execute _update-az-extensions getting results.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V7CnZ1p8Nl29jd2XQSTFmw.png" /><figcaption>Found outdated extensions and upgrade them.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c1c8Q0uXE4AuyFEQFpqD0w.png" /><figcaption>No outdated extensions was found.</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c5c24d6053ec" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[在 Synology DSM 使用 Microsoft Garnet]]></title>
            <link>https://dinowang.medium.com/%E5%9C%A8-synology-dsm-%E4%BD%BF%E7%94%A8-microsoft-garnet-4a63dfcee397?source=rss-b48b33672114------2</link>
            <guid isPermaLink="false">https://medium.com/p/4a63dfcee397</guid>
            <category><![CDATA[garnet]]></category>
            <category><![CDATA[microsoft]]></category>
            <category><![CDATA[redis]]></category>
            <category><![CDATA[synology]]></category>
            <dc:creator><![CDATA[Dino Wang]]></dc:creator>
            <pubDate>Sat, 24 Aug 2024 14:36:40 GMT</pubDate>
            <atom:updated>2024-08-24T15:38:43.566Z</atom:updated>
            <content:encoded><![CDATA[<h3>Garnet</h3><p><a href="https://github.com/microsoft/garnet">Garnet</a> 是 Microsoft Research 推出的一個新的遠端快取存儲，旨在實現極快、可擴展、 和低延遲。Garnet 使用 Redis 的 RESP 作為其主要有線協定。因此，可以將 Garnet 與大多數程式設計語言<a href="https://redis.io/docs/latest/develop/connect/clients/">中可用的</a>未修改的 Redis 用戶端一起使用，例如，使用 C# 中的 <a href="https://github.com/StackExchange/StackExchange.Redis">StackExchange.Redis</a>。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CKSdzd1IsBrPKwlxYdl8_g.jpeg" /></figure><p><a href="https://github.com/microsoft/garnet">microsoft/garnet: Garnet is a remote cache-store from Microsoft Research that offers strong performance (throughput and latency), scalability, storage, recovery, cluster sharding, key migration, and replication features. Garnet can work with existing Redis clients. (github.com)</a></p><p>Garnet 容器化應用程式並沒有在 Docker Hub 上發布，可以透過 ghcr.io 獲取。</p><p><a href="https://github.com/microsoft/garnet/pkgs/container/garnet">Package garnet (github.com)</a></p><h3>Synology DSM — Container Manager</h3><p>在 Synology DSM 中允許我們利用 <a href="https://kb.synology.com/zh-tw/DSM/help/ContainerManager/docker_desc?version=7">Container Manager</a> 執行用戶指定的容器，並可以透過公開的 container registry 來獲取這些容器化的應用程式，把 Garnet 放到 DSM 上測試好像也是個方法 😈。</p><p>除了預設在 DSM 中的 Docker Hub 以及 Aliyun Hub 外你可以新增其他的 container registry，在這個案例中釋出並儲存在 ghcr.io 的容器化應用程式目前尚未由 DSM 所支援，所以並無法在 Container Manager 中新增來自 ghcr.io 的容器應用程式。</p><h3>Solution</h3><p>不過你可以使用 SSH 連入 DSM 自行下載 container，完成之後 Container Manager 一樣可以管理容器應用程式，設定執行環境或觀察其 log。</p><p>首先是登入到 DSM</p><pre>ssh &lt;user&gt;@&lt;synology-ip-address&gt;<br><br>sudo docker pull ghcr.io/Microsoft/garnet:latest<br></pre><p>成功完成下載的情況</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vcF_05h8AJ_p3wayNki57g.png" /><figcaption>透過 SSH 登入 Synology DSM 執行 docker pull 下載 Garnet 的容器映像檔</figcaption></figure><p>完成容器下載後，便可以透過 DSM 的 Container Manager 進行 image 的管理，進而執行容器</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ymSMD_wmIYsR_CibDCnwZw.png" /><figcaption>Container image 管理</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5V-fgBgf8pK_10EFzrZdjg.png" /><figcaption>執行中的 Microsoft Garnet container</figcaption></figure><h3>Test</h3><p>接著我們測試一下執行在 Synology DSM 的 Garnet ，可以透過 Redis 所發佈的 RedisInsights 桌面應用程式，進行操作或其他相容性的測試。</p><p><a href="https://redis.io/insight/">RedisInsight — The Best Redis GUI</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ip11AyLgndtxAY63XwCMqw.png" /><figcaption>建立 Garnet on Synology 的連線資訊</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_XNmotxcXavhEkzuoKayug.png" /><figcaption>載入預設資料集測試</figcaption></figure><p>以上是自己的驗證 Garnet 相容性時利用 DSM 的一點小記錄，給自己做備忘。</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4a63dfcee397" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[建立 .gitignore 的幾個好用工具和姿勢]]></title>
            <link>https://dinowang.medium.com/generate-gitignore-in-several-ways-cbabed6ff7d0?source=rss-b48b33672114------2</link>
            <guid isPermaLink="false">https://medium.com/p/cbabed6ff7d0</guid>
            <category><![CDATA[vscode]]></category>
            <category><![CDATA[git]]></category>
            <dc:creator><![CDATA[Dino Wang]]></dc:creator>
            <pubDate>Sun, 16 Dec 2018 17:54:37 GMT</pubDate>
            <atom:updated>2018-12-16T17:59:28.666Z</atom:updated>
            <content:encoded><![CDATA[<h3>建立 .gitignore 的幾個好用工具和姿勢</h3><p>運用 gitignore.io 生成團隊適用的 .gitignore 檔案</p><p>有使用 Git 的朋友們大概對 .gitignore 不太陌生吧？.gitignore 是用來設定不要進入 Git repo 的檔案或目錄，以開發 ASP.NET Core 舉例，專案目錄下的 bin 或 obj 目錄，是編譯時期生成的檔案一般是不進到 repo 的，此時就可以運用 .gitignore 的機制將其設定為排除。</p><p>之前也曾經分享過使用一個集中的 GitHub 專案 <a href="https://github.com/github/gitignore">gitignore</a> ，該專案提供了非常多預先設計適用於各個環境的 .gitignore 檔，例如剛剛舉例的 ASP.NET Core 專案，如果您是在 Visual Studio 中進行開發，就可以取得該專案下的 <a href="https://github.com/github/gitignore/blob/master/VisualStudio.gitignore">VisualStudio.gitignore</a> 儲存成您專案目錄下的 .gitignore 即可。</p><p>前陣子經過同事 YC 的推薦知道了 <a href="https://www.gitignore.io/">gitignore.io</a> 這個服務，這個服務的優點在於它可以協助自動合成多個 .gitignore 檔案設定，例如：您的 ASP.NET Core 專案有多人開發，開發環境同時有 Visual Studio、Visual Studio Code，同時有多個作業系統包含了 Windows 與 macOS (這些作業系統都有機會在目錄下生成)，另外 ASP.NET Core 需要考慮排除的檔案或目錄的設定，這麼一來需要組合五個 gitignore 檔案，您可以透過 gitignore.io 網站介面一口氣完成並下載。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/792/1*KwyyEajzISIsKsJFWLHCGg.gif" /><figcaption>使用 gitignore.io 網站產生 .gitignore 檔</figcaption></figure><p>gitignore.io 提供 API 讓你可以不需要瀏覽器就可以取得組合的 gitignore 檔案相同一個例子來說，透過一個 URL GET 你就可以得到同樣的設定檔</p><pre><a href="https://www.gitignore.io/api/macos,windows,aspnetcore,visualstudio,visualstudiocode">https://www.gitignore.io/api/macos,windows,aspnetcore,visualstudio,visualstudiocode</a></pre><p>相信部分開發團隊已經有一點感覺了，但只是這樣還不足以說嘴啊，還有更好的武器在後面呢。</p><p><strong>Yeoman</strong></p><p>若未曾安裝過 yeoman，那就這裡請 <a href="https://yeoman.io/">https://yeoman.io/</a>。</p><p>接下來安裝 generator-gitignore-io</p><pre>npm install --global yo generator-gitignore-io</pre><p>身為 scaffolding 工具的強者，加裝 generator-gitignore-io 套件後便可以從命令列中做到跟網站一樣的事情。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*neAsD1B5tBl8htQnhKKCOQ.gif" /><figcaption>運用 yeoman 的 generator-gitignore-io 套件產生 .gitignore 檔案</figcaption></figure><p>generator-gitignore-io 會在同一目錄下產生設定檔 .yo-rc.json，此舉為了讓您再次執行時叫出前次設定結果，僅針對新增與刪除部分處理，不用每次重來。</p><p><strong>Visual Studio Code</strong></p><p>是的，跨界開發工具之王 Visual Studio Code 當然也不落人後的擁有類似的套件方便開發者生成 .gitignore 檔案，首先安裝 VSCode 插件 .gitignore Generator</p><pre><a href="https://marketplace.visualstudio.com/items?itemName=piotrpalarz.vscode-gitignore-generator">https://marketplace.visualstudio.com/items?itemName=piotrpalarz.vscode-gitignore-generator</a></pre><p>以熱鍵 F1 喚醒 command palette，找到 gitignore generator (我習慣輸入 giti)，接下來就是搜尋以及勾選所需要設定組的親切介面。完成後按下 ok 就會在專案下生成 .gitignore 檔。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2iZU1RwfJEJjhLUvrOEdzA.gif" /><figcaption>運用 VSCode 的 gitignore generator 套件產生 .gitignore 檔案</figcaption></figure><p>VSCode 的 gitignore generator 一樣支援第二次叫用時將前次值帶出的功能，但更聰明的是不需要額外的設定檔，推估應該是直接解析了檔頭中註解行的 URL。</p><p>版本控制是個良好的習慣，但是將無關的檔案也簽入 repo 可能帶來不便的結果，妥善的設定 .gitignore 是個重要的關鍵，運用適當的工具來協助你事半功倍。</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cbabed6ff7d0" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>