feat: v0.4.0 — 配置架构重构 + 一键多端推送 + 项目级代理控制\n\n架构重构:\n- 配置从 Platform→User→Project 重构为扁平的 Projects+Groups+Credentials 模型\n- 侧边栏完全重写,适配新分组→项目树结构\n- 新增分组(Group)管理和凭据(Credential)管理\n\n新功能:\n- 一键多端推送:Push All 按钮,将当前分支/标签推送到所有远程仓库\n- 项目级代理控制:每个项目独立设置代理(跟随全局/强制开启/强制关闭)\n- GitClient 新增 RunWithProxy 方法,支持按调用级别覆盖全局代理\n- 所有网络操作(Pull/Push/Fetch)均支持项目级代理设置\n\n其他:\n- 新增 CHANGELOG.md 版本更新日志\n- 更新 README/README_CN 文档,反映最新 72+ API 方法\n- 版本号升级到 0.4.0(config.yml/info.json/Info.plist)
Some checks failed
Release / build-windows (push) Has been cancelled

This commit is contained in:
zyj
2026-03-12 11:41:26 +08:00
parent 3ec453cc38
commit c787c99622
17 changed files with 1443 additions and 727 deletions

121
README.md
View File

@@ -4,7 +4,7 @@
A cross-platform desktop Git repository management tool built with **Go + Wails v3 + Nuxt 4 + Vue 3**.
Manage multiple Git repositories across different platforms (GitHub, Gitee, Gitea, etc.) from a single unified interface — like a lightweight, standalone version of VS Code's Git panel.
Manage multiple Git repositories across different platforms (GitHub, Gitee, Gitea, etc.) from a single unified interface — like a lightweight, standalone version of VS Codes Git panel.
![Go](https://img.shields.io/badge/Go-1.25-00ADD8?logo=go&logoColor=white)
![Wails](https://img.shields.io/badge/Wails-v3-red?logo=go&logoColor=white)
@@ -14,10 +14,12 @@ Manage multiple Git repositories across different platforms (GitHub, Gitee, Gite
## ✨ Features
### Multi-Platform Management
### Project & Group Management
- Manage repositories from **GitHub**, **Gitee**, **Gitea**, and custom Git platforms
- Organize projects by **Platform → User → Project** hierarchy
- Add / remove platforms, users, and projects through the GUI
- Organize projects into custom **Groups** (e.g. `github/user`, `gitea`, `work`)
- Manage **Credentials** per platform (GitHub / Gitee / Gitea with custom base URL)
- **Clone** remote repositories directly from the GUI with group assignment
- Add / remove / move projects between groups
### VS Code-Style Git Operations
- **View changed files** with a collapsible directory tree structure
@@ -27,51 +29,96 @@ Manage multiple Git repositories across different platforms (GitHub, Gitee, Gite
- **Diff viewer** with syntax-highlighted additions and deletions
- **Binary file detection** — skips preview for images, executables, etc.
### Multi-Remote Support
- Manage multiple remotes per project (origin, upstream, etc.)
- **Remote selector** dropdown to switch active remote
- Add / remove remotes through the GUI
- **Push to All Remotes** — one-click push current branch to every remote
- **Push Tag to All Remotes** — push tags to all remotes at once
### Per-Project Proxy Control
- Each project can independently control proxy usage
- Three modes: **Follow Global** / **Force Proxy On** / **Force Proxy Off**
- All network operations (Pull / Push / Fetch / Push All) respect per-project proxy settings
- System proxy auto-detection from Windows registry / macOS scutil / Linux gsettings
### Commit History
- Browse commit history with author, time, and message
- Click a commit to view its **changed file list** (like VS Code)
- Click a commit to view its **changed file list**
- Select a file to view its **per-file diff**
- **Version rollback** — hard / mixed / soft reset with confirmation dialog
- **Revert commit** — create a reverse commit
- **Search commits** — filter by message keyword and/or author
### Branch Management
- View all local branches with current branch indicator
- View all local and remote branches
- **Create / Delete / Merge** branches
- **Switch branches** via dropdown selector
- **Pull / Push / Fetch** with current branch awareness
- **Checkout remote branches** to local
- **Delete remote branches**
### Tag Management
- View all tags with hash, message, and timestamp
- **Create tags** (lightweight or annotated)
- **Push tags** to selected remote or all remotes
- **Delete tags** (local and remote)
### Stash Management
- **Save** current changes with optional message
- **Apply / Pop / Drop** stash entries
- View stash list with descriptions
### Merge Conflict Resolution
- Detect merge state and display conflict indicator
- View and edit conflict files in a built-in editor
- **Mark as resolved / Abort merge / Complete merge**
### Batch Operations
- View all projects overview (branch, changes, push status)
- **Batch Pull / Push** all projects at once
- Results displayed per project
### Git Installation Detection
- Auto-detect Git installation on startup
- If not installed, show a full-screen guide
- **Auto-download and install** Git for Windows with progress tracking
### Desktop Experience
- **System tray** — close window hides to tray, click tray icon to restore
- **Resizable panels** — drag splitters between sidebar, file list, and viewer
- **Dark theme** — Catppuccin Mocha color scheme with Ant Design Vue
- **Native folder picker** — select project paths via OS file dialog
- Git global config editor (user.name / user.email)
## 🏗️ Tech Stack
| Layer | Technology |
|-------|-----------|
| Backend | Go 1.25, Wails v3 (alpha.74) |
| Backend | Go 1.25, Wails v3 |
| Frontend | Nuxt 4, Vue 3.5, Vite 7 |
| UI Library | Ant Design Vue 4, @ant-design/icons-vue |
| Git Operations | Git CLI with proxy support, 30s timeout |
| Git Operations | Git CLI wrapper with per-project proxy support |
| Config | YAML-based persistent configuration |
| Build | Taskfile v3 |
| Build | Taskfile v3, NSIS installer (Windows) |
## 📁 Project Structure
```
GitPilot/
├── main.go # Wails app entry, system tray, window management
├── config.yaml # Platform/user/project configuration
├── cmd/main.go # Wails app entry, system tray, window management
├── config.yaml # Projects / Groups / Credentials configuration
├── CHANGELOG.md # Version history
├── Taskfile.yml # Build tasks
├── go.mod
├── cmd/ # CLI utilities
├── config/
│ └── config.go # YAML config loader/saver
│ └── config.go # YAML config types & loader/saver
├── internal/
│ ├── proxy.go # System proxy detection
│ ├── proxy.go # System proxy detection (Windows/macOS/Linux)
│ ├── git/
│ │ └── client.go # Git CLI wrapper (34 operations)
│ │ └── client.go # Git CLI wrapper with RunWithProxy support
│ └── app/
── service.go # AppService — 34 methods exposed to frontend
── service.go # AppService — 72 methods exposed to frontend
│ └── gitsetup.go # Git installation detection & auto-install
├── frontend/
│ ├── nuxt.config.ts
│ ├── package.json
@@ -81,10 +128,12 @@ GitPilot/
│ ├── layouts/
│ │ └── default.vue # Ant Design dark theme provider
│ └── components/
│ ├── Sidebar.vue # Platform/user/project tree sidebar
│ ├── ContentArea.vue # Git status, diff, history, branches
── FileTreeNode.vue # Recursive file tree with actions
└── build/ # Wails build configuration
│ ├── Sidebar.vue # Group/project tree, batch ops, credentials
│ ├── ContentArea.vue # Git status, diff, history, branches, tags
── FileTreeNode.vue # Recursive file tree with stage/discard
│ ├── CommitFileTreeNode.vue # Commit file tree viewer
│ └── GitCheck.vue # Git installation check screen
└── build/ # Wails build config, NSIS installer scripts
```
## 🚀 Getting Started
@@ -108,14 +157,9 @@ cd GitPilot
cd frontend && npm install && cd ..
# Generate Wails bindings
wails3 generate bindings
# Build frontend
cd frontend && npx nuxi generate && cd ..
wails3 generate bindings -d frontend/bindings
# Run in development mode
task dev
# or
wails3 dev -config ./build/config.yml -port 9245
```
@@ -129,19 +173,28 @@ The binary will be output to the `bin/` directory.
## 📋 API Overview
GitPilot exposes **34 backend methods** to the frontend via Wails bindings:
GitPilot exposes **72+ backend methods** to the frontend via Wails bindings:
| Category | Methods |
|----------|---------|
| **Projects** | GetProjectTree, AddProject, RemoveProject, SelectDirectory |
| **Platforms** | AddPlatform, UpdatePlatform, RemovePlatform, GetPlatformInfo |
| **Users** | AddUser, UpdateUser, RemoveUser, GetUserInfo |
| **Project Management** | GetProjectTree, AddProject, RemoveProject, CloneProject, MoveProjectToGroup, SelectDirectory |
| **Group Management** | GetGroups, AddGroup, UpdateGroup, RemoveGroup |
| **Credential Management** | GetCredentials, AddCredential, UpdateCredential, RemoveCredential |
| **Git Status** | GetProjectStatus, GetProjectChangedFiles, GetFileContent, GetFileDiff, GetFileDiffStaged |
| **Staging** | StageFiles, UnstageFiles, StageAll, UnstageAll |
| **Commit** | CommitChanges, DiscardFiles |
| **Remote** | PullProject, PushProject, FetchProject |
| **History** | GetCommitLog, GetCommitDiff, GetCommitFiles, GetCommitFileDiff |
| **Branches** | GetBranches, SwitchBranch, ResetProject |
| **Remote Operations** | PullProject, PushProject, FetchProject, PushToAllRemotes, PushTagToAllRemotes |
| **Remote Management** | GetRemotes, AddRemote, RemoveRemote |
| **Proxy Control** | GetProjectProxy, SetProjectProxy |
| **Commit History** | GetCommitLog, GetCommitDiff, GetCommitFiles, GetCommitFileDiff, RevertCommit, SearchCommitLog |
| **Branch Management** | GetBranches, SwitchBranch, CreateBranch, DeleteBranch, MergeBranch, ResetProject |
| **Remote Branches** | GetRemoteBranches, CheckoutRemoteBranch, DeleteRemoteBranch |
| **Tags** | GetTags, CreateTag, DeleteTag, PushTag |
| **Stash** | StashSave, GetStashList, StashApply, StashPop, StashDrop |
| **Conflict Resolution** | IsMerging, GetConflictFiles, GetConflictFileContent, SaveConflictFile, ResolveConflictFile, AbortMerge |
| **Batch Operations** | GetAllProjectOverview, BatchPull, BatchPush |
| **Settings** | GetGitGlobalConfig, SetGitGlobalConfig, GetAppSettings, UpdateAppSettings |
| **Git Setup** | CheckGitInstalled, SelectGitInstallDir, InstallGit |
## 📄 License