例:我現在要下載nginx這個項目
![]
有這種方法
1,瀏覽器上直接放在如下地址
https://minhaskamal.github.io/DownGit/#/home
將要下載的項目連接貼上去,下載到本地計算機。這裏可以找到連接地址。
2,使用git工具下載
安裝git工具
yum install git -y
選擇一個空目錄
[root@docker test]# pwd
/test
[root@docker test]#
創建一個空的本地倉庫
[root@docker test]# git init
Initialized empty Git repository in /test/.git/
[root@docker test]#
連接遠程倉庫GitHub
[root@docker test]# git remote add -f origin https://github.com/devops-apps/dockerfile.git
Updating origin
remote: Enumerating objects: 182, done.
remote: Counting objects: 100% (182/182), done.
remote: Compressing objects: 100% (153/153), done.
Receiving objects: 8% (16/182), 60.00 KiB | 25.00 KiB/s
注意,url地址是.git結尾
開啓sparse checkout 模式
[root@docker test]# git config core.sparsecheckout true
[root@docker test]#
拉取項目[root@docker test]# # git pull origin master