公司目前登录github网速很慢,所以在码云上创建了gitee仓库。保证代码能提交到码云,回去后,再推送到github上。
可以参考这个文章:https://www.cnblogs.com/HDWdemo/p/12666629.html
配置:
- 1:打开 .idea下面的conf文件,目前是github地址
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
[remote "origin"]
url = https://github.com/XXX/XXX.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
- 2:在码云上新建仓库 XXX
在最下面增加配置。
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
[remote "origin"]
url = https://github.com/hyoGirl/MySpringBoot.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
[remote "gitee"]
url = https://gitee.com/XXX/XXX.git
fetch = +refs/heads/*:refs/remotes/origin/*
提交
- 1:查看分支
git remote -v - 2:提交代码
网友评论