github上下載文件夾

例:我現在要下載nginx這個項目

github上下載文件夾![]

有這種方法
1,瀏覽器上直接放在如下地址
https://minhaskamal.github.io/DownGit/#/home

github上下載文件夾

將要下載的項目連接貼上去,下載到本地計算機。這裏可以找到連接地址。
github上下載文件夾

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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章