R's Workshop

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

List Branches Match a Patern and Show Author of Last Commit

看到一個蠻有卻的寫法, 可以列出所有 remote branch 的 last commit 的 author name 和 date for branch in `git branch -r | grep -v HEAD`;do echo -e `git show --format="%ai by %an" $branch | head -n 1` \\t$branch; done Read more