github与gitee代码同步push教程
步骤1:
在gitee在已经有仓库
复制该仓库的 https://gitee.com/*******.git 的https地址
步骤2:
选择Import repository
步骤3:
``URL 输入刚刚gitee上的 https://gitee.com/*******.git`
fejxc/写你在github上的仓库名
然后点击 Begin import 即可
步骤4:
1.先将gitee项目的代码克隆到本地电脑
2.然后修改config文件 文件在 .git/concig
3.修改如下
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
precomposeunicode = true
[remote "origin"]
# github
url = git@github.com:*****.git #add code
# gitee
url = https://gitee.com/*****.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"] #add code
remote = origin
merge = refs/heads/master
步骤5:
验证代码:
git add .
git commit -m "init"
git push