apply patch到在不同資料夾不同的檔案名的檔案

動機 之前遇到,要apply一個patch到十分類似的檔案,雖然說十分類似,但還是會想說會不會因為有不同的地方所以會報錯之類的,結果沒有,所以記錄一下 ...

February 1, 2021 · 1 min · zhengcf

git conflict 與 three-ways-merge

動機 之前有遇過,但沒有好好認識他,來記錄一下 ...

February 1, 2021 · 1 min · zhengcf

git筆記

動機 git的指令很多,希望能用一種統一的觀點來看 commit as Node (folder) -> (stage :: node) -> (repo :: linked list) | \ / (stash :: pool of nodes) Linked List new node & use existing node git add 把folder中的file,加到node中 git stash 把還沒加到repo(linked list)的node放到node的暫存區 edit the last node git amend 修改最後一個node(HEAD) iterate nodes git filter-branch list.map ... git rebase newlist = list.each ...; list.append(newlist) 可以edit, squash(融合), drop, pick(保留) ptr to node git tag 單純的ptr git branch 替node加上新的ptr,只是這個ptr會在他被append一個新node時,把該ptr往後移動 所以可以把這個ptr當成"最新"或是"現在" append node(s) git commit 把目前的node加到目前HEAD的後面 就是list....

June 15, 2020 · 1 min · zhengcf