Skip to content

Latest commit

 

History

History
115 lines (77 loc) · 1.98 KB

File metadata and controls

115 lines (77 loc) · 1.98 KB

🧰 gix

🇨🇳 中文文档 | 🇺🇸 English

gix is a Git extension CLI tool designed to simplify your Git workflows — especially for merging commits and force pushing, with safety and clarity.

📦 Versions

This repository contains two implementations:

Both versions provide identical functionality. Choose based on your preference:

  • Use Rust for a standalone binary with no runtime dependencies
  • Use TypeScript if you prefer npm/pnpm package management

🚀 Features

  • 🔧 Interactively merge multiple Git commits
  • 💬 Custom commit message input
  • 🚦 Confirm force push automatically
  • ♻️ Reset local commits to remote (soft)
  • 🧱 Fully typed, powered by TypeScript
  • 🔌 Modular command system — more to come

📦 Installation

Rust Version (Recommended)

cargo install gix-cli

Or build from source:

cd rust
cargo build --release
# Binary will be at rust/target/release/gix

TypeScript Version

npm install -g gix-cli

Then use it globally:

gix merge

🛠 Usage Examples

Merge commits

gix merge

Follow the prompts to:

  • Select start and end commits
  • Write a new commit message
  • Optionally force-push

Or directly:

gix merge -f <from> -m "your message"

Squash commits

gix squash -n 3      # squash last 3 commits
gix squash --all     # squash all history from root

Check your Git state

gix doctor
  • Check git & node version
  • Git repo state
  • Working directory clean?
  • Remote & branch info

Discard all local commits (soft reset to remote)

gix reset
  • Soft reset to origin/branch
  • Keeps all local file changes
  • Removes unpushed commits only

📄 License

MIT © 2025 Li Kai