@vinhtieng123/easy-git
v1.1.4
Published
A simple CLI tool to manage git repositories easily.
Maintainers
Readme
🧩 easy-git
A simple Node.js CLI tool to manage Git branches and commits with an interactive prompt.
✨ Features
- ✅ List all local branches
- ✅ Highlight current branch
- ✅ Select multiple branches to delete
- ✅ Prevent deletion of current branch
- ✅ Search commit messages by keyword
- ✅ Get changed files between two commits and compress them
- ✅ Press
qanytime to quit
📦 Installation
Install easy-git globally:
npm install -g @vinhtieng123/easy-git
# or
yarn global add @vinhtieng123/easy-git
# or
pnpm add -g @vinhtieng123/easy-git🚀 Usage
easy-gitOptions
-b, --branches Delete unused branches
-s, --search-commit Search for a commit message or hash
-d, --diff-commit Get diff file between 2 commits
-h, --help Show help information
-v, --version Show version informationbranches
easy-git -bThis command will list all local branches, highlight the current branch, and allow you to select multiple branches to delete. It will also prevent the deletion of the current branch.
You can press q anytime to quit.
Example output:
? Select branches to delete (Press <space> to select, <a> to select all, <i> to invert selection, <enter> to confirm):
( ) branch1
( ) branch2
( ) branch3
( ) branch4
( ) branch5After selecting the branches, you will be prompted to confirm the deletion:
? Are you sure you want to delete the selected branches? (y/n)If you confirm, the selected branches will be deleted.
search-commit
easy-git -sThis command will prompt you to enter a keyword to search for in commit messages. It will then display the commit messages that match the keyword.
You can press q anytime to quit.
Example output:
? Enter a keyword to search for in commit messages: (Press <enter> to confirm)
? Search results:
commit1: Fix bug in feature X
commit2: Add new feature Y
commit3: Update documentation for feature Zdiff-commit
easy-git -dThis command will prompt you to enter two commit hashes to get the diff file between them. It will then display the changed files and compress them into a zip file.
You can press q anytime to quit.
Example output:
? Enter the first commit hash: (Press <enter> to confirm)
? Enter the second commit hash: (Press <enter> to confirm)
? Changed files:
- file1.txt
- file2.txt
- file3.txt
? Compressing changed files into a zip file...
? Zip file created: changed_files.zipLicense
This project is licensed under the MIT License. See the LICENSE file for details.
Contributing
Contributions are welcome! Please open an issue or submit a pull request if you have any suggestions or improvements.
