因为仓库命名不能重名,因此需要为不同仓库的使用不同的仓库名,添加仓库后,再分别提交到对应仓库
1、初始化
git init
2、追踪所有文件
git add .
3、提交到暂存区
git commit -m "一些备注"
4、添加两个仓库
git remote add name1 git@github.com:XXXXXX.git
git remote add name2 git@gitee.com:XXXXXX.git
name1、name2 是两个仓库的名字
5、提交到不同仓库
git push -u name1
git push -u name1