如何将MyClouds开源项目同时提交到gitee和github代码托管平台上去

前言
一直都是将MyClouds提交到gitee,今天想同时推送一份代码到github去做为备份。尝试了一下仍是很方便的。  

步骤
1. 打开工程根目录下的.git\config配置文件。追加github相关配置。git

[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两个远程仓库列表。github

3. 执行git push github或者git push gitee就能分别推送到不一样的仓库,也能够同时批量推送。

后记MyClouds开源开发平台 https://gitee.com/osworks/MyCloudsbash

相关文章
相关标签/搜索