admin管理员组文章数量:1123049
安装git
下载之后一路next就可以
官网: https://git-scm/downloads
生成公钥
ssh-keygen -t rsa -C "allen5g@qq"
查看生成公钥
cat /c/Users/Administrator/.ssh/id_rsa.pub
复制打印出来的公钥
注册gitee
登录网址,按照知识填信息一步步就好了,不多赘述。官网: Gitee(gitee)
配置公钥
先进入设置,在主页头像下,或者右上角
输入公钥
到这步已经完成了配置,下边可以拿之前的一个项目试试(右上角新创建一个也行)
复制clone网址
测试
git clone git@gitee: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:Allen5g/linux-c-cpp-collection.git
89483ed..ff701bf master -> master
Branch 'master' set up to track remote branch 'master' from 'origin'.
成功结束
版权声明:本文标题:Windows配置gitee 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/biancheng/1724690710a931965.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论