👩💻 Join our community of thousands of amazing developers!
這學期修了幾個資工系的課,都需要寫程式作業,原本我是一個作業開一個 repo,但是我發現這樣好像會開超級多 repo,於是我決定要想辦法合併他們。 找資料 首先去 Google 搜尋「git merge two repo」,第一條結果是是一個 13 年前的 stack overflow https://stackoverflow.com/questions/1425892/how-do-you-merge-two-git-repositories,裡面第一個回答提到的方法是把待合併 repo A 指到目標 repo B 的 branch A,然後就把 branch A 當作一般分支合併,但是要加上 --allow-unrelated-histories 選項 filter-repo 現在有個問題,原本的目錄結構是長這樣 1 2 3 4 5 6 7 8 9 10 11 12 13 . ├── HW1 │ ├── .git │ ├── go.mod │ └── main.go ├── HW2 │ ├── .git │ ├── go.mod │ └── main.g...