English | 简体中文
A Chinese-language interactive menu for Git: it wraps the most common Git operations into a numbered menu, handy when you are not yet fluent with raw Git commands.
- Interactive numbered menu (1-10) with a colored Chinese interface showing the current directory.
- One keystroke for the most common Git operations: init, status, add+commit, log, push, pull, diff, branches, checkout, merge.
- Empty commit messages auto-generate a timestamped one.
- Ships
git-tool注释版.sh: same functionality as the main script but line-by-line commented, good for learning.
git-tool.sh # main script (165 lines, run directly)
git-tool注释版.sh # annotated edition (382 lines, comment per line)
- Bash (Git Bash / WSL / any Linux)
- Git (installed and on PATH)
# run inside any Git repository (or a directory you want to init)
bash git-tool.shType a number to run the matching operation; press Enter to return to the menu, 0 to quit.
| Option | Action | Actual command |
|---|---|---|
| 1 | Init repository | git init -b main |
| 2 | Status | git status |
| 3 | Add + commit | git add -A + git commit (timestamp if left empty) |
| 4 | Log | git log -10 --graph ... |
| 5 | Push | git push |
| 6 | Pull | git pull --no-rebase |
| 7 | Diff | git diff |
| 8 | Branches | git branch -a |
| 9 | Checkout | git checkout <branch> |
| 10 | Merge | git merge <branch> |
| 0 | Quit | - |
Note: the script runs under
set -e, so any failing Git command aborts; checkout/merge ask for a branch name and reject empty input.
MIT License, see LICENSE.