如何將MyClouds開源專案同時提交到gitee和github程式碼託管平臺上去
阿新 • • 發佈:2019-03-28
前言
一直都是將MyClouds提交到gitee,今天想同時推送一份程式碼到github去作為備份。嘗試了一下還是很方便的。
步驟
1. 開啟工程根目錄下的.git\config配置檔案。追加github相關配置。
[remote "gitee"] url = https://gitee.com/osworks/MyClouds.git fetch = +refs/heads/*:refs/remotes/gitee/* [remote "github"] url = https://github.com/xiongchun/myclouds.git fetch = +refs/heads/*:refs/remotes/github/*
2. 執行git remote命令檢視一下。正常的話應該顯示:gitee和github兩個遠端參列表。
3. 執行git push github或者git push gitee就能分別推送到不同的倉庫,也可以同時批量推送。
後記:MyClouds開源開發平臺 https://gitee.com