最近要配合新的git server建置,汰除老舊的git server,所以準備搬git repostiories,想要保留原來的commit記錄,所以研究一下怎麼搬家,這裡提供兩種方式
- 用git command –mirror
- 直接把repository檔案copy到新的server 專案路徑即可
1.1 先clone一份到local 加上–mirror
1.2.在新的環境建立新的repository後,取得權限和url
切換到剛剛clone的路徑下git push –mirror
就完成了migrate了
2.另一個作法是直接copy
結果都一樣
參考:
留言