其他分享
首页 > 其他分享> > gitee使用方法和克隆共有仓库

gitee使用方法和克隆共有仓库

作者:互联网

首先需要自己注册gitee
地址:https://gitee.com/
然后按步骤自己注册就行了
注册后创建个人仓库
比如创建dubbo-demo-service
创建也很简单,自己创建后点这个就会出现这个地方
然后点代码会有黑色的地方教你怎么创建仓库
这个时候你可以找到:比如王导的公开地址:复制。下载这里
在这里插入图片描述
然后在200上直接克隆就型了,一系列命令如下

[root@hdss7-200 ~]# mkdir dubbo
[root@hdss7-200 ~]# 
[root@hdss7-200 ~]# cd dubbo/
[root@hdss7-200 dubbo]# ls
[root@hdss7-200 dubbo]# git clone https://gitee.com/stanleywang/dubbo-demo-service.git
Cloning into 'dubbo-demo-service'...
remote: Enumerating objects: 290, done.
remote: Counting objects: 100% (290/290), done.
remote: Compressing objects: 100% (149/149), done.
remote: Total 290 (delta 69), reused 192 (delta 45), pack-reused 0
Receiving objects: 100% (290/290), 23.94 KiB | 0 bytes/s, done.
Resolving deltas: 100% (69/69), done.
[root@hdss7-200 dubbo]# ls
dubbo-demo-service
[root@hdss7-200 dubbo]# cd dubbo-demo-service/
[root@hdss7-200 dubbo-demo-service]# ls
dubbo-api  dubbo-server  pom.xml  README.md
[root@hdss7-200 dubbo-demo-service]# git config --global user.name "yelinxiaosheng"
[root@hdss7-200 dubbo-demo-service]# git config --global user.email "609436769@qq.com"
[root@hdss7-200 dubbo-demo-service]# git init
Reinitialized existing Git repository in /root/dubbo/dubbo-demo-service/.git/
[root@hdss7-200 dubbo-demo-service]# git add .
[root@hdss7-200 dubbo-demo-service]# git commit -m "first commit"
# On branch master
nothing to commit, working directory clean
[root@hdss7-200 dubbo-demo-service]# git remote add origin https://gitee.com/yelinxiaosheng/dubbo-demo-service.git
fatal: remote origin already exists.
[root@hdss7-200 dubbo-demo-service]# git remote remove origin      ##这句话是因为目录已经存在了,去清楚一下的命令
[root@hdss7-200 dubbo-demo-service]# git remote add origin https://gitee.com/yelinxiaosheng/dubbo-demo-service.git
[root@hdss7-200 dubbo-demo-service]# git push -u origin master
Username for 'https://gitee.com': yelinxiaosheng
Password for 'https://yelinxiaosheng@gitee.com': 
Counting objects: 231, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (103/103), done.
Writing objects: 100% (231/231), 19.69 KiB | 0 bytes/s, done.
Total 231 (delta 52), reused 223 (delta 46)
remote: Resolving deltas: 100% (52/52), done.
remote: Powered by GITEE.COM [GNK-6.1]
To https://gitee.com/yelinxiaosheng/dubbo-demo-service.git
 * [new branch]      master -> master
Branch master set up to track remote branch master from origin.
[root@hdss7-200 dubbo-demo-service]# 

最后出现的结果就是这样的
点开自己的用户,已经把王导的这个公开项目的代码都克隆过来了,就可以用自己的 Jenkins去用蓝海创建了
在这里插入图片描述

标签:hdss7,dubbo,克隆,service,200,仓库,demo,gitee,root
来源: https://blog.csdn.net/Laiyunpeng666/article/details/120098324