GitHub加速

1.2.0

通过多个 GitHub 镜像站点自动尝试 git 操作,按历史成功率智能排序,实现国内无障碍访问 GitHub 仓库。

命令用法:

1. 拉取-GitHub镜像:在现有仓库中通过镜像站 fetch + 快进合并拉取当前分支。
  拉取-GitHub镜像 [-镜像站前缀 <镜像URL列表>] [-远程名 origin]
  例:拉取-GitHub镜像;拉取-GitHub镜像 -远程名 upstream

2. 克隆-GitHub镜像:通过镜像站浅克隆仓库(--depth 1 --single-branch),仅取默认分支最新提交;克隆完成后自动将远程 origin 改回原始 GitHub 地址,后续 git 操作不受镜像影响。
  克隆-GitHub镜像 <仓库HTTPS/SSH地址> <本地路径> [-
通过多个 GitHub 镜像站点自动尝试 git 操作,按历史成功率智能排序,实现国内无障碍访问 GitHub 仓库。

命令用法:

1. 拉取-GitHub镜像:在现有仓库中通过镜像站 fetch + 快进合并拉取当前分支。
  拉取-GitHub镜像 [-镜像站前缀 <镜像URL列表>] [-远程名 origin]
  例:拉取-GitHub镜像;拉取-GitHub镜像 -远程名 upstream

2. 克隆-GitHub镜像:通过镜像站浅克隆仓库(--depth 1 --single-branch),仅取默认分支最新提交;克隆完成后自动将远程 origin 改回原始 GitHub 地址,后续 git 操作不受镜像影响。
  克隆-GitHub镜像 <仓库HTTPS/SSH地址> <本地路径> [-镜像站前缀 <镜像URL列表>]
  例:克隆-GitHub镜像 "git@github.com:用户/仓库.git" "D:\Repo"

3. 推送-GitHub:直连推送当前分支,支持可选代理。若当前分支尚无跟踪则自动建立跟踪。
  推送-GitHub [<仓库目录,默认当前目录>] [-代理 <代理地址>] [-远程名 <远程>]
  远程自动解析:有 origin 用 origin;无 origin 且仅一个远程则用该远程;无 origin 且多个远程则报错。
  代理首次指定即永久记住,以后无需再指定;传空字符串可清除。代理仅以 git -c http.proxy/-c https.proxy 本次进程内生效,不影响手动 git。
  启用 LFS 的仓库会自动检测推送范围是否改动 LFS 文件,未改动则自动跳过 LFS 对象上传。
  例:推送-GitHub -代理 "http://127.0.0.1:7890/";推送-GitHub

4. 查看-镜像统计:查看各镜像站的历史成功率、耗时等统计。
  查看-镜像统计

5. 重置-镜像统计:清除镜像统计记录,从头开始。
  重置-镜像统计
Show more

Minimum PowerShell version

5.1

Installation Options

Copy and Paste the following command to install this package using PowerShellGet More Info

Install-Module -Name GitHub加速

Copy and Paste the following command to install this package using Microsoft.PowerShell.PSResourceGet More Info

Install-PSResource -Name GitHub加速

You can deploy this package directly to Azure Automation. Note that deploying packages with dependencies will deploy all the dependencies to Azure Automation. Learn More

Manually download the .nupkg file to your system's default download location. Note that the file won't be unpacked, and won't include any dependencies. Learn More

Owners

Copyright

(c) 2026 一致行动党。MIT 许可证。

Package Details

Author(s)

  • 埃博拉酱-机器人

Tags

git GitHub 代理 提取 拉取 镜像 加速 中国

Functions

拉取-GitHub镜像 克隆-GitHub镜像 推送-GitHub 查看-镜像统计 重置-镜像统计

Dependencies

This module has no dependencies.

Release Notes

推送-GitHub 新增 LFS 自动检测:推送范围内的提交未改动 LFS 文件时自动跳过 LFS 对象上传(避免为上游大体积 LFS 数据白等,如 fork 的大仓库仅推送代码提交的场景)。

FileList

Version History

Version Downloads Last updated
1.2.0 (current version) 10 9/13/2026
1.1.0 27 8/10/2026
1.0.0 44 6/7/2026