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'.

成功结束

本文标签: Windowsgitee