R's Workshop

Create Linux User and Assign Group via Command Line

紀錄一下如何透過 command line 建立 linux user Read more

Git Rebase Onto

Git rebase --onto 指令可把某一段連續的 commits rebase 到新的 parent commit 上. 我通常會用這個方式捨棄當前 branch 和目標 branch 重複但不完全相同的 commits, 避免直接 rebase 時遇到 conflict. Read more

Push Git Branch to Remote and Set upstream

把 local 的 branch push 到 remote 後, 通常也會同步設定將 local 的 branch 的 upstream 設成 remote branch. 這樣之後 fetch/pull 時就會自動更新. 以下紀錄作法. Read more

Colorize Bash Prompt

因為工作會同時 ssh 好幾台 server, 常常不小心在錯的 server 上下指令 … “Orz 為了避免認錯 server, 只好在每台 server 的 bash prompt 設定不同顏色作為識別. 基於每次改顏色都在網路上亂找, 這邊紀錄一下常遇到的問題. Read more

Assign Repo Version Used for Repo-based Project Management

Google 的 git-repo 在 v2.19 後修改了每個 git project 的 .git/ softlink 方式. (參考 commit 2a089cf.) 這造成我用 docker 的 overlayfs 特性省 source code 空間的手法 (mount .repo 進 docker container) 失效. 所以目前的 workaround 方法就是指定 re... Read more