A Go Git CLI.
This logo was created by gopherize.me.
ggc is a Git tool written in Go, offering both traditional CLI commands and an interactive interface with incremental search. You can either run subcommands like ggc add directly, or launch the interactive mode by simply typing ggc. Designed to be fast, user-friendly, and extensible.
- Traditional command-line interface (CLI): Run ggc [args] to execute specific operations directly.
- Interactive interface: Run ggc with no arguments to launch an incremental search UI for command selection.
- Simple commands for common Git operations (add, push, pull, branch, log, etc.)
- Composite commands that combine multiple Git operations
- Interactive UI for branch/file selection and message input
- Implemented using the Go standard library and:
- golang.org/x/term – for terminal interaction
- golang.org/x/sys – for low-level OS interaction
- gopkg.in/yaml.v3 – for parsing ~/.ggcconfig.yaml
- OS: macOS (Apple Silicon/Intel) - Verified
- Go version: 1.24 or later recommended
- Dependencies: Go standard library, golang.org/x/term, golang.org/x/sys, gopkg.in/yaml.v3
- Requirement: git command must be installed
Pre-compiled binaries are available for multiple platforms and architectures. This is the fastest way to get started with ggc.
Visit the Releases page to download the latest binary for your platform:
- macOS: darwin_amd64 (Intel), darwin_arm64 (Apple Silicon)
- Linux: linux_amd64, linux_arm64
- Windows: windows_amd64
The easiest way to install ggc is using the provided installation script:
Or download and run it manually:
The script will:
- Detect your operating system and architecture
- Download the appropriate binary for your system
- Install using git, manual go install fallback
- Verify the installation
Place the ggc binary in a directory included in your PATH.
For development, you can use the Makefile to install required tools and dependencies:
The Makefile will automatically install required tools like golangci-lint using go install.
- The ggc binary will be installed to $GOBIN (usually $HOME/go/bin).
- If $GOBIN is in your PATH, you can use ggc from anywhere.
- If not, add it to your PATH:
Note
When using go install, you may get limited version info due to ldflags not working with go install. It is recommended to build with make build or use the install script or binaries.
Just run:
- Type to filter commands (incremental search)
- Use ctrl+n/ctrl+p to move selection, Enter to execute
- If a command requires arguments (e.g. <file>, <name>, <url>), you will be prompted for input (always left-aligned)
- After command execution, results are displayed and you can press Enter to continue
- After viewing results, you return to the command selection screen for continuous use
- Use "quit" command or ctrl+c to exit interactive mode
- All UI and prompts are in English
| add <file> | Add specific file to the index |
| add . | Add all changes |
| add -p | Add changes interactively |
| branch current | Show current branch |
| branch checkout | Checkout existing branch |
| branch checkout-remote | Checkout remote branch |
| branch create | Create and checkout new branch |
| branch delete | Delete a branch |
| branch delete-merged | Delete merged branches |
| branch list-local | List local branches |
| branch list-remote | List remote branches |
| clean files | Clean untracked files |
| clean dirs | Clean untracked directories |
| commit | Commit staged changes |
| commit amend <message> | Amend previous commit |
| commit amend --no-edit | Amend without editing message |
| commit allow-empty | Create an empty commit |
| commit tmp | Create temporary commit |
| diff staged | Show staged changes |
| diff unstaged | Show unstaged changes |
| fetch --prune | Fetch and prune remotes |
| log simple | Show commit logs in simple format |
| log graph | Show commit logs with a graph |
| pull current | Pull current branch |
| pull rebase | Pull with rebase |
| push current | Push current branch |
| push force | Force push current branch |
| rebase | Rebase current branch |
| remote list | List remotes |
| remote add <name> <url> | Add a new remote |
| remote remove <name> | Remove a remote |
| remote set-url <name> <url> | Change remote URL |
| config list | List config variables |
| config get <key> | Get value for config key |
| config set <key> <value> | Set config key and value |
| hook list | List all hooks |
| hook install <hook> | Install a hook |
| hook enable <hook> | Enable a hook |
| hook disable <hook> | Disable a hook |
| hook uninstall <hook> | Remove a hook |
| hook edit <hook> | Edit a hook |
| tag list | List all tags |
| tag create <v> | Create a tag |
| tag annotated <v> <msg> | Create annotated tag |
| tag delete <v> | Delete a tag |
| tag push | Push all tags |
| tag push <v> | Push specific tag |
| tag show <v> | Show tag details |
| stash | Stash current changes |
| stash pop | Apply and remove latest stash |
| stash drop | Remove latest stash |
| status short | Show concise status |
| version | Show current ggc version |
Add the following to your ~/.bash_profile or ~/.bashrc:
Add the following to your ~/.zshrc:
Add the following to your ~/.config/fish/config.fish:
This setup will automatically find the completion script regardless of the installed version.
- Git Documentation - Complete Git reference documentation
- Git Tutorial - Official Git tutorial for beginners
- Git User Manual - Comprehensive Git user guide
Below are the Git commands that ggc wraps, along with links to their official documentation:
- git branch - List, create, or delete branches
- git checkout - Switch branches or restore working tree files
- git commit - Record changes to the repository
- git log - Show commit logs
- git push - Update remote refs along with associated objects
- git pull - Fetch from and integrate with another repository or a local branch
- git fetch - Download objects and refs from another repository
- git remote - Manage set of tracked repositories
- git status - Show the working tree status
- git diff - Show changes between commits, commit and working tree, etc
- git stash - Stash the changes in a dirty working directory away
- git config - Get and set repository or global options
- git tag - Create, list, delete or verify a tag object signed with GPG
- git rebase - Reapply commits on top of another base tip
- Git Workflow - Official Git workflow documentation
- Git Best Practices - Branching workflows from Pro Git book
- Conventional Commits - Specification for commit message format
- Git Hooks - Customizing Git with hooks
- Pro Git Book - Free online book about Git
- Git Cheat Sheet - Quick reference for Git commands
- GitHub Git Handbook - Introduction to Git and GitHub
- Atlassian Git Tutorials - Comprehensive Git tutorials and guides
- lazygit - Simple terminal UI for Git commands
- tig - Text-mode interface for Git
- gitui - Blazing fast terminal-ui for Git
- magit - Git interface for Emacs
See CONTRIBUTING.md and CODE_OF_CONDUCT.md for details.
If you’d like to support my work, please consider sponsoring me!
Or simply giving ⭐ on GitHub is greatly appreciated—it keeps me motivated to maintain and improve the project! :D
This project is licensed under the MIT License - see the LICENSE.md file for details.
.png)


