git基础–(5)–git添加远程仓库,在github上添加gitosc码云,同步代码

版权声明:编码不易,禁止转载 https://blog.csdn.net/u_ascend/article/details/85410362

有时候github不稳定,国内有码云:https://gitee.com/
需求:同步两个库之间的代码
情况1: 新目录下迁出gitHub代码,添加gitee远程仓库

cd existing_git_repo
git remote
git remote add origin https://gitee.com/test/kukii.git
git push -u origin master

其中 git push -u origin master 我们可以不用执行,这个时候需要重启IDEA,当我们提交代码的时候,可以先提交到github。然后ctrl+shift+k 就可以选择网gitosc上提交代码了。

猜你喜欢

转载自blog.csdn.net/u_ascend/article/details/85410362