git worktree 的出現成功取代了 git stash 的功能 (處理臨時出現問題時, 開一個 linked working directory 就好). git worktree 也可以讓使用者免於同時 clone 好幾份相同的 project 在單一電腦上, 以及免除在不同 cloned project 間 cherry-pick 的麻煩. 不過 git worktree add... Read more 21 Oct 2022 - 2 minute read
若要 update 一個已經建立的 tag, 需要透過 git tag -f 指令更新 Read more 19 Oct 2022 - less than 1 minute read
前幾天在這篇文章中看到 git 可以 tag blob/tree objects. 紀錄一下要如何 tag 一個 blob object. Read more 19 Oct 2022 - less than 1 minute read
在開大型 git project (e.g. linux) 的 log 時, 常會花上幾秒鐘的時間讀取. 原因是 git 需要重複做以下動作: 讀取 commit 的 content –> 找到 parent commit –> 讀取 parent commit 的 content –> (loop). 為了加速 log 的讀取, git 提供了 git commit-gr... Read more 24 Sep 2022 - less than 1 minute read
Git 是由四大 objects - blob, tree, commit, 和 tag 組成. 其中, blob 物件存放一個檔案完整內容的 snapshot. 當一個檔案經過多次修改後, 會產生多個 blob objects. 若這些未經處理的 objects 直接存放到 Git 的 objects store, 所消耗的硬碟空間會相當可觀. 因此, Git objects store ... Read more 18 Sep 2022 - less than 1 minute read