git合併不同倉庫的修改 -- 新舊代碼同步

git init

git remote add trans_old https://××××××××××.git   (舊的git倉庫代碼地址)

git remote add trans_new https://×××××××××.git  (新的git倉庫代碼地址)

git fetch trans_old

git fetch trans_new

git checkout -b trans_new/branchName

git merge trans_old/branchName

git push trans_new trans_new/branchName

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章