GitSmarter 是一款面向 Windows 的原生 Git 客户端,单个可执行文件仅约 2.5 MB,采用 C++20 和 Direct2D 编写,直接解析 Git 内部数据结构,无任何外部依赖。

Stars

33

7 天增长

暂无数据

Fork 数

2

开放 Issue

0

开源协议

MIT

最近更新

2026-07-13

AI 仓库情报摘要
FR-AI / ANALYSIS

为什么值得关注

它实现了接近 Git 命令行本身的性能(克隆 Linux 内核时仅慢 5%),同时体积极小、无依赖,原生支持 Git 协议,无需捆绑 libgit2、Electron 或 Web 视图。

适合谁使用

  • 希望使用轻量、高性能 Git GUI 的 Windows 开发者
  • 需要原生 pack 文件与协议 v2 支持的 Git 高级用户
  • 对笨重或缓慢的 Electron 框架 Git 客户端感到不满的用户
  • 对现代 C++20 代码库和自定义控件框架感兴趣的贡献者

典型使用场景

  • 从 GUI 或命令行以接近命令行的速度克隆大型仓库(如 Linux 内核)
  • 浏览本地仓库的 branch、tag、工作区状态,使用虚拟化侧边栏
  • 完成暂存、提交、推送/拉取操作(基于 Smart HTTP Protocol v2),无需额外安装 Git
  • 通过 GitHub OAuth 设备流程进行身份验证,凭证存储在 Windows Credential Manager 中

项目优势

  • 高性能:克隆 Linux 内核(1130 万对象,6GB pack)耗时 289 秒,Git 命令行需 275 秒(仅慢约 5%),采用无锁多线程增量解析和内存映射 I/O
  • 极小体积:单个约 2.5 MB 的可执行文件,无运行时依赖——无需 libgit2、无需捆绑 Git CLI、无需 Electron 或 Web 视图
  • 原生 Windows 集成:Direct2D 渲染、DWM 平滑动画、Windows Credential Manager 存储令牌、无边框窗口与自定义控件框架
  • 快速构建与架构支持:使用统一构建快速生成发行版;自动检测 x64 或 ARM64 并原生编译,ARM 上支持 NEON SIMD

使用前须知

  • 仅支持 Windows(无 macOS 或 Linux 版本)
  • 缺少重要功能:合并(merge)、变基(rebase)、挑选(cherry-pick)、二分查找(bisect)以及非快进拉取尚未实现(仅有桩代码)
  • 需要 Visual Studio 2022 和 CMake 才能构建,对仅希望使用预构建二进制文件的普通用户来说门槛较高

README 快速开始

GitSmarter

A fast, native Git client for Windows in a single ~2.5 MB executable.

GitSmarter is written in C++20 and rendered entirely with Direct2D. It has no external runtime dependencies — no libgit2, no bundled git CLI, no Electron, no web view. It speaks Git natively: loose objects, pack files (.idx/.pack), delta resolution, the index, refs, and Smart HTTP Protocol v2 are all parsed and implemented directly. The result is a single small binary that holds its own against Git itself — cloning the Linux kernel (11.3M objects, 9.15M deltas, 6GB pack, 92K files) completes within 5% of the Git CLI's own time (289s vs 275s), using multithreaded lock-free delta resolution, memory-mapped I/O, and a sharded object cache.

Features

  • Repository browsing — open any local repository; branches, tags, remotes, and working-tree status in a virtualized sidebar
  • Staging and committing — stage/unstage files, write commits directly to the object database, rename detection with similarity scoring
  • Diff viewer — inline and side-by-side modes with syntax highlighting, line numbers, and smooth animated scrolling
  • Commit history graph — full history walk with branch lane assignment and colored graph visualization
  • Fetch / push / pull — Smart HTTP Protocol v2 implemented from scratch, including pack generation for push and fast-forward pull; runs on a background worker thread with progress UI
  • Clone — from the GUI or the command line: GitSmarter.exe clone , with --headless for console-only use and owner/repo / gh:owner/repo URL shorthand
  • GitHub authentication — OAuth device flow with tokens stored in the Windows Credential Manager; also reads URL-embedded credentials, .gitconfig, and GH_TOKEN/GITHUB_TOKEN
  • Stash — create, apply, pop, drop, and clear stashes
  • Branch operations — create, switch, rename, and delete branches
  • Command palette — fuzzy-matched keyboard access to every command
  • Background sync — periodic fetch with ahead/behind indicators in the status bar
  • Custom UI — borderless window with native DWM integration, a hand-rolled Direct2D widget framework, and a frame-driven animation system that uses near-zero CPU when idle

Building

Prerequisites

  • Windows 10/11 (x64 or ARM64)
  • Visual Studio 2022

项目描述

A fast, dependency-free native Git client for Windows. C++20, Direct2D, direct git-internals parsing, single ~2.5 MB executable.

相关仓库与替代方案

根据分类、Topic 和编程语言匹配的相似项目。

alecjacobson
精选
alecjacobson GitHub avatar

alpha-wrap

A CGAL-free, MIT-licensed reimplementation of the Alpha Wrapping algorithm that takes a defective triangle soup and produces a watertight, manifold, outward-oriented mesh with controllable level of detail and tightness.

C++
4
hypervising
精选
hypervising GitHub avatar

gta-enhanced-audio-queue-poc

A proof-of-concept tool that patches a synchronous three-slot audio queue in GTA V Enhanced, boosting frame rates from ~260 to ~499 FPS by removing coarse wait delays.

设计与创意
3
ammaarreshi
ammaarreshi GitHub avatar

Generals-Mac-iOS-iPad

This repository ports Command & Conquer Generals: Zero Hour to run natively on Apple Silicon Macs, iPhones, and iPads without emulation, adding touch controls and modern rendering.

C++
1,523