發表文章

目前顯示的是 5月, 2023的文章

[GIT]轉移整包git commit 至其他台主機

  先將原git的mirror整包 clone 下來 1 git clone --mirror https://git.compilerok/oldJob.git 到 gitlab 建一個空的 repo 進到專案資料夾,設定新的遠端 git repo 位置 1 2 cd oldJob .git/ git remote set-url --push origin https://Newgit.compilerok/newJob.git local 更新 remote branch,因為是新的 repo,並將本地的 origin/xxx 都刪囉。-p == --prune 1 git fetch -p origin 最後將整包 push 上去 1 git push --mirror 可以在 Gitl上看到 repo 裡有先前的所有紀錄與內容囉。