[GIT]轉移整包git commit 至其他台主機
- 先將原git的mirror整包 clone 下來1
git clone --mirror https://git.compilerok/oldJob.git - 到 gitlab 建一個空的 repo
進到專案資料夾,設定新的遠端 git repo 位置
12cdoldJob.git/git remote set-url --push originhttps://Newgit.compilerok/newJob.git- local 更新 remote branch,因為是新的 repo,並將本地的 origin/xxx 都刪囉。-p == --prune1
git fetch -p origin - 最後將整包 push 上去1
git push --mirror 可以在 Gitl上看到 repo 裡有先前的所有紀錄與內容囉。
留言
張貼留言