Windows配置gitee
【摘要】
安装git
下载之后一路next就可以
官网: https://git-scm.com/downloads
生成公钥
ssh-keygen -t rsa -C "allen5g@qq.com"
查看生成公钥
cat /c/Users/Administrator/.ssh/id_rsa.pub
复制打印出来的公...
安装git
下载之后一路next就可以
官网: https://git-scm.com/downloads
生成公钥
ssh-keygen -t rsa -C "allen5g@qq.com"
查看生成公钥
cat /c/Users/Administrator/.ssh/id_rsa.pub
复制打印出来的公钥
注册gitee
登录网址,按照知识填信息一步步就好了,不多赘述。官网: Gitee(gitee.com)
配置公钥
先进入设置,在主页头像下,或者右上角
输入公钥
到这步已经完成了配置,下边可以拿之前的一个项目试试(右上角新创建一个也行)
复制clone网址
测试
git clone git@gitee.com:Allen5g/linux-c-cpp-collection.git
clone成功,本地多了项目文件
测试修改提交
可以本地尝试修改文件,然后按照git流程提交修改
-
$ git status
-
On branch master
-
Your branch is up to date with 'origin/master'.
-
-
Changes not staged for commit:
-
(use "git add <file>..." to update what will be committed)
-
(use "git restore <file>..." to discard changes in working directory)
-
modified: README.md
-
-
no changes added to commit (use "git add" and/or "git commit -a")
-
-
Administrator@Allen-Windows MINGW64 /d/000-Workspace/linux-c-cpp-collection (master)
-
$ git add README.md
-
Administrator@Allen-Windows MINGW64 /d/000-Workspace/linux-c-cpp-collection (master)
-
$ git commit
-
[master ff701bf] modify readme txt
-
1 file changed, 1 insertion(+)
-
Administrator@Allen-Windows MINGW64 /d/000-Workspace/linux-c-cpp-collection (master)
-
$ git push -u origin master
-
Enumerating objects: 5, done.
-
Counting objects: 100% (5/5), done.
-
Delta compression using up to 8 threads
-
Compressing objects: 100% (3/3), done.
-
Writing objects: 100% (3/3), 284 bytes | 284.00 KiB/s, done.
-
Total 3 (delta 2), reused 0 (delta 0), pack-reused 0
-
remote: Powered by GITEE.COM [GNK-6.0]
-
To gitee.com:Allen5g/linux-c-cpp-collection.git
-
89483ed..ff701bf master -> master
-
Branch 'master' set up to track remote branch 'master' from 'origin'.
-
成功结束
文章来源: allen5g.blog.csdn.net,作者:CodeAllen的博客,版权归原作者所有,如需转载,请联系作者。
原文链接:allen5g.blog.csdn.net/article/details/119842636
【版权声明】本文为华为云社区用户转载文章,如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱:
cloudbbs@huaweicloud.com
- 点赞
- 收藏
- 关注作者
评论(0)