Windows配置gitee
Posted 我是CodeAllen
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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
复制打印出来的公钥
注册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'.
成功结束
以上是关于Windows配置gitee的主要内容,如果未能解决你的问题,请参考以下文章
ext html片段,ext.html · 潜行的青衣/jquery-ui-ext - Gitee.com
ext html片段,ext.html · 潜行的青衣/jquery-ui-ext - Gitee.com