Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

git-tool

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.

Contents

Features

  • 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.

Files

git-tool.sh         # main script (165 lines, run directly)
git-tool注释版.sh    # annotated edition (382 lines, comment per line)

Requirements

  • Bash (Git Bash / WSL / any Linux)
  • Git (installed and on PATH)

Usage

# run inside any Git repository (or a directory you want to init)
bash git-tool.sh

Type a number to run the matching operation; press Enter to return to the menu, 0 to quit.

Menu Options

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.

License

MIT License, see LICENSE.

About

A Chinese-language interactive menu that wraps the most common Git operations for people not yet fluent with raw Git commands.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages