R's Workshop

Git Packfile

Git 是由四大 objects - blob, tree, commit, 和 tag 組成. 其中, blob 物件存放一個檔案完整內容的 snapshot. 當一個檔案經過多次修改後, 會產生多個 blob objects. 若這些未經處理的 objects 直接存放到 Git 的 objects store, 所消耗的硬碟空間會相當可觀. 因此, Git objects store ... Read more

Run Gerrit Server on Docker Container

因為想摸索一下 git-repo, 所以用 docker 快速架了一個 Gerrit server. Read more

Speedup Repo Sync by Referencing Local Repository

在使用 git-repo 管理程式碼時, 如果 git project 很多或 git object store 很大 (e.g. linux kenrel), 在 repo sync 時間就會花上許多時間 fetch code. 一個加速的方法是利用 git clone 的 reference 功能, 參考 local 已 sync 過得 repo repository 裡的 git da... Read more

Use Git Fetch instead of Git Pull

紀錄一下使用 git fetch 來更新 branch 的方法, 取代平常使用的 git pull Read more

List Upstreams of Git Branches

有時候 git remote 設太多, 要查詢 branch tracking 的 upstream 可以用以下方式. Read more