Git Workbench
Git Workbench is a powerful, professional CLI suite designed to enhance your Git and GitHub workflow. It provides a set of interactive tools to simplify common tasks, enforce conventions, and visualize repository data.
Features
Git Workbench includes a comprehensive suite of tools:
- Git Basics: Interactive guide to learn and execute core Git commands.
- Git Clean: safely remove merged branches and keep your repository tidy.
- Git Stats: Visualize repository statistics, including contributor activity and file breakdowns.
- Git Undo: Interactive menu to safely undo recent Git operations (commits, merges, stages).
- PR Maker: Generate professional Pull Request descriptions from your commit history using templates.
- Git Who: Analyze code contributions by author with percentage breakdowns.
- Commit Lint: Enforce and validate Conventional Commit messages.
Installation
Prerequisites
- Python 3.8 or higher
- Git installed and available in your PATH
local Installation
Clone the repository and install in editable mode:
git clone https://github.com/Rohan7654/git_workbench.git
cd git_workbench
pip install -e .
Usage
Once installed, you can use the gw command (or git_workbench) to access the suite.
Main Menu
Launch the interactive main menu:
gw
Direct Commands
You can also run specific tools directly:
# Clean up merged branches
gw clean
# View repository statistics
gw stats
# Interactive undo menu
gw undo
# Generate a PR description
gw pr
# Analyze contributors
gw who
# Validate commit messages
gw lint
Interactive Demos
See what Git Workbench looks like in action.
1. Main Menu
Running gw launches the central hub:
╭────── Git Workbench Suite ──────╮
│ │
│ Select a tool to get started │
│ │
╰───────────────────────────────────╯
Git Basics Learn & execute basic git commands
Git Clean Remove merged branches, clean up repos
Git Stats Beautiful git statistics for a repo
Git Undo Easily undo git operations
PR Maker Generate PR descriptions from commits
Git Who Show who contributed what % of code
Commit Lint Enforce conventional commit messages
Exit
2. Git Stats
gw stats gives you a comprehensive overview:
╭──────────────── Git Statistics ─────────────────╮
│ │
│ Comprehensive repository analysis │
│ │
╰─────────────────────────────────────────────────╯
Analyzing repository... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100%
╭────────────── Repository Overview ──────────────╮
│ Metric Value │
│ ─────────────────────────────────────────────── │
│ Total Commits 1,243 │
│ Contributors 12 │
│ Total Files 89 │
│ Branches 5 │
│ Repository Age 245 days │
╰─────────────────────────────────────────────────╯
3. Git Undo
gw undo helps you recover from mistakes safely:
╭────────────────── Git Undo ──────────────────╮
│ │
│ Safely undo git operations with guidance │
│ │
╰──────────────────────────────────────────────╯
Current State:
Last commit: a1b2c3d - Fix login bug
Staged: 2 | Modified: 1 | Untracked: 0
[?] What do you want to undo?
> Last commit (keep changes staged)
Last commit (keep changes unstaged)
Last commit (discard all changes)
Last merge
Staged files (unstage all)
4. PR Maker
gw pr generates descriptions from your work:
╭────────── PR Description Generator ──────────╮
│ │
│ Create beautiful PR descriptions from commits│
│ │
╰──────────────────────────────────────────────╯
Recent Commits:
a1b2c3d Fix login bug
e4f5g6h Update documentation
[?] Select a template:
> Standard - Comprehensive template with checklist
Minimal - Simple and concise format
Feature - For new feature PRs
Bugfix - For bug fix PRs
5. Git Clean
gw clean keeps your repository tidy:
╭────────────────── Git Clean ───────────────────╮
│ │
│ Remove merged branches and clean up the repo │
│ │
╰────────────────────────────────────────────────╯
[?] Select branches to delete:
> [x] feature/login-page (merged)
[ ] feature/new-api (merged)
[x] hotfix/typo-fix (merged)
6. Git Basics
gw basics is your interactive guide:
╭───────────── Git Basics ─────────────╮
│ │
│ Learn and execute basic git commands │
│ │
╰────────────────────────────────────────╯
[?] Select a category to explore:
> Setup & Config
Information
Staging & Commits
Branching & Merging
Remote Operations
Undo Operations
Advanced
Show All Commands
7. Git Who
gw who reveals the top contributors:
╭────────────────── Git Who ───────────────────╮
│ │
│ Analyze code contributions by author │
│ │
╰──────────────────────────────────────────────╯
Analyzing contributions... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Contributions by Commits
Rank Author Commits Percentage Contribution
1st Dev One 450 36.2% ████████████░░░░░░░░░░░░
2nd Dev Two 320 25.7% ████████░░░░░░░░░░░░░░░░
3rd Dev Three 150 12.1% ████░░░░░░░░░░░░░░░░░░░░
8. Commit Lint
gw lint enforces your commit standards:
╭──────────────── Commit Lint ─────────────────╮
│ │
│ Validate conventional commit messages │
│ │
╰──────────────────────────────────────────────╯
Checking last 10 commits...
╭─ Status ── Hash ──── Type ────── Message ────────────────────────╮
│ ✓ a1b2c3d feat Add new login page component │
│ ✓ e4f5g6h fix Resolve issue with auth token │
│ ✗ i7j8k9l - wip fixing stuff │
╰──────────────────────────────────────────────────────────────────╯
Summary:
Valid: 9
Invalid: 1
Needs improvement. Only 90% of commits are valid.
Testing
GitAssist comes with a comprehensive test suite. To run the tests, install the development dependencies and use pytest:
pip install pytest pytest-mock
pytest
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Metadata
Release files for git-workbench 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| git_workbench-1.0.0.tar.gz | 31.0 kB | Without provenance | Details for git_workbench-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| git_workbench-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for git_workbench-1.0.0-py3-none-any.whl |
Total release size: 64.1 kB
Release files / git_workbench-1.0.0.tar.gz
| Download URL | git_workbench-1.0.0.tar.gz |
|---|---|
| Size | 31.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0bbdc1077714c98c2f9a9da612b7dbf5ed337ffa7e7a3569c83d9b8512235f0c
|
|
BLAKE2b-256 checksum How to use checksums |
2aa4c9f8460806bd84e9bcee16387b6220822c6814f46eb4b4e86e13cd1129d2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.0
|
Release files / git_workbench-1.0.0-py3-none-any.whl
| Download URL | git_workbench-1.0.0-py3-none-any.whl |
|---|---|
| Size | 33.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a01ba2500a87a1ca144b6c8a6feff8d56091ec001600ee4f5a527e6c90e0b738
|
|
BLAKE2b-256 checksum How to use checksums |
a977be917f7a9376e3cca1f38983f087b8bee265bd284c8803994e2520b2c8c5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.0
|
Security for git-workbench 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.