注意:此方法对Git-LFS方式上传的文件可能无效!!!
一.打开PowerShel运行命令
在 Windows 中,可以通过以下步骤打开 PowerShell 终端:
-
使用搜索功能:
- 点击 Windows 按钮(开始菜单左下角的 Windows 图标)。
- 在搜索框中键入 "PowerShell" 或 "Windows PowerShell"。
- 在搜索结果中,选择 "Windows PowerShell" 或 "Windows PowerShell ISE"。
-
使用菜单:
- 右键点击 Windows 按钮(开始菜单左下角的 Windows 图标)。
- 选择 "Windows PowerShell" 或 "Windows PowerShell ISE"。
-
使用运行命令:
- 按下
Win + R
组合键,打开运行对话框。 - 键入
powershell
或powershell_ise
,然后按 Enter 键。
- 按下
二.下载仓库文件
2.1下载公开仓库文件
$owner = " Your owner"
$repo = "Your repo"
$branch = "Your branch"
$path = "Your path"
# API 请求 URL
$url = "https://api.g