1、克隆代码到本地
git clone https://gitee.com/bbigsun/docsify-template.git
克隆到本地,默认标签名称为 origin
origin https://gitee.com/bbigsun/docsify-template.git (fetch)
origin https://gitee.com/bbigsun/docsify-template.git (push)
修改标签名称文章源自十年又十年-https://www.bbigsun.com/216.html
git remote rename origin gitee
2、连接远程仓库
连接 Gitee 远程仓库文章源自十年又十年-https://www.bbigsun.com/216.html
git remote add gitee https://gitee.com/bbigsun/docsify-template.git
连接 GitHub 远程仓库文章源自十年又十年-https://www.bbigsun.com/216.html
git remote add github https://github.com/bbigsun/docsify-template.git
查看当前远程仓库文章源自十年又十年-https://www.bbigsun.com/216.html
git remote -v
4、提交代码
提交代码到 Gitee文章源自十年又十年-https://www.bbigsun.com/216.html
git push gitee master
提交代码到 GitHub文章源自十年又十年-https://www.bbigsun.com/216.html
git push github master
5、拉取代码
从 Gitee 拉取代码到本地文章源自十年又十年-https://www.bbigsun.com/216.html
git pull gitee master
从 GitHub 拉取代码到本地文章源自十年又十年-https://www.bbigsun.com/216.html
git pull github master
PS:由于代码相同,拉取一次即可文章源自十年又十年-https://www.bbigsun.com/216.html 文章源自十年又十年-https://www.bbigsun.com/216.html
纸上得来终觉浅,绝知此事要躬行。
17688689121
我的微信
微信扫一扫
评论