GitPush Tool 🚀
A supercharged Git CLI and safety tool that simplifies repository creation and pushing with intelligent defaults, rich pre-push diffstat inspection (+++--- lines), and active safeguards against dangerous Git commands.
✨ Features
- Smart Sync Engine (
gitpush sync): Intelligent single-command replacement forgit pull → git add → git commit → git push. Automatically detects repository state (clean, dirty, ahead, behind, diverged) and safely synchronizes with remote. - Decision-Support Status Dashboard (
gitpush status): Actionable repository overview showing worktree breakdown, commit sync, intelligent next-step recommendations, and a 0-100 Repo Health score. - Interactive Undo Engine (
gitpush undo): Reversible and safe rollback for commits and pushes with detailed previews. - Pre-Push Safety & Diffstat Preview: See changed files, line additions/deletions (
+X, -Y), ahead/behind status, and pending commits before pushing. - Dangerous Git Operation Guard: Analyzes and protects against risky actions (
reset --hard, force pushes, deleting unmerged branches, dirtygit clean, detached HEADs). - Protected Branch Safeguard: Automatically detects and alerts when pushing or force-pushing to
main,master,prod,release, ordev. - One-Command GitHub Repo Creation: Initialize Git, create a remote GitHub repo, and push in a single step via GitHub CLI (
gh). - Safe Force Pushing: Uses
--force-with-leaseby default to avoid overwriting teammate commits. - Dry-Run Mode: Preview your push inspection without modifying anything.
- Non-Interactive & CI Friendly: Skip prompts with
-yor--yes.
📊 Decision-Support Status Dashboard (gitpush status)
Repository: my-project
Branch: feature/payment
Tracking: origin/feature/payment
WORKTREE
────────────────────────
Modified 4
Added 2
Deleted 1
Untracked 3
Line Changes +142, -18
COMMITS
────────────────────────
Ahead 3
Behind 1
PUSH / STATUS
────────────────────────
⚠ Remote has 1 commit(s) you don't have locally.
Recommended:
git pull --rebase
gitpush "Commit message"
Health:
82/100 [████████░░] Good (Minor Action Needed)
🛡️ Pre-Push Warning & Inspection
Whenever you run gitpush, you get an instant, clear breakdown of your repository state:
═══════════════════════════════════════════════════════════════
🚀 GITPUSH PRE-PUSH INSPECTION & SUMMARY
═══════════════════════════════════════════════════════════════
Repository: my-project (/Users/username/Projects/my-project)
Target Branch: main ⚠️ [PROTECTED BRANCH] ──> origin/main
Sync Status: Ahead: 2 commit(s), Behind: 0 commit(s)
Action: Commit: 'Add user authentication flow'
Warnings:
⚠️ Pushing directly to protected branch 'main'.
Changed Files (3 file(s), +84 / -12):
M src/auth.py (+65, -8)
M README.md (+19, -4)
?? config/auth.json (+12 lines, untracked)
Pending Commits to Push (2):
• 8f3d1a2 Initial auth scaffold
• 4e9c7b1 Implement JWT token verification
═══════════════════════════════════════════════════════════════
Continue? [y/N]:
🛑 Dangerous Command Guard
Use gitpush guard <command> (or gitpush-guard <command>) before executing risky Git operations:
Command: [WARNING ⚠️]
git reset --hard HEAD~5
Changes that may be lost:
5 commit(s)
12 modified/staged file(s)
Risks & Warnings:
⚠️ All uncommitted changes in tracked files will be permanently discarded.
⚠️ 12 uncommitted modified/staged file(s) will be lost immediately.
⚠️ 5 commit(s) will be unlinked from current branch HEAD.
Repository:
my-project
Continue? [y/N]:
What Guard Detects:
reset --hard: Identifies uncommitted files and commits that will be orphaned.force push: Detects remote overwrite risks and protected branch overrides.deleting branches: Identifies unmerged commits that would be lost.cleaning untracked files: Warns of files/directoriesgit clean -fdwill permanently delete.checkout / restore: Flags uncommitted modifications about to be discarded.rebasing with uncommitted work: Warns of dirty working trees before rebase conflicts occur.pushing to protected branches: Direct pushes tomain,master,prod,dev, etc.detached HEAD situations: Warns when working or committing on detached HEADs.
🛠️ Usage & Commands
| Command | Description |
|---|---|
gitpush "Commit message" |
Stages all changes, previews diffs, commits, and pushes. |
gitpush |
Pushes staged/unpushed changes with safety preview. |
gitpush -y |
Pushes immediately without confirmation prompt. |
gitpush --dry-run |
Shows the pre-push inspection and exits without changes. |
gitpush --force |
Safe force push using --force-with-lease. |
gitpush --tags |
Pushes all local tags. |
gitpush guard <git command> |
Inspects and guards any dangerous Git command. |
gitpush --init |
Initializes Git repo and creates default .gitignore. |
gitpush --new-repo <name> |
Creates a new GitHub repo and pushes in one step. |
📄 License
MIT License. See LICENSE for details.
Metadata
Release files for gitpush-tool 0.4.3
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 |
|---|---|---|---|---|
| gitpush_tool-0.4.3.tar.gz | 38.1 kB | Without provenance | Details for gitpush_tool-0.4.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gitpush_tool-0.4.3-py3-none-any.whl | Python 3 | none | any | Details for gitpush_tool-0.4.3-py3-none-any.whl |
Total release size: 73.7 kB
Release files / gitpush_tool-0.4.3.tar.gz
| Download URL | gitpush_tool-0.4.3.tar.gz |
|---|---|
| Size | 38.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ef5cda62c28cc902fbc0158e48b0835037ebf34e5060c053ee41a4924c47f4a6
|
|
BLAKE2b-256 checksum How to use checksums |
d1f3879b8353fccb2a47c962f8f5849398c42198340d3701cd7979a375de9de7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|
Release files / gitpush_tool-0.4.3-py3-none-any.whl
| Download URL | gitpush_tool-0.4.3-py3-none-any.whl |
|---|---|
| Size | 35.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dd1e1035b0c7c2dbae6198ebbb7cadcd16a5f82de4b537ac6048ca9cc37dd4b6
|
|
BLAKE2b-256 checksum How to use checksums |
02f1296fab4f217411cc3f813004d7d7dc246c995777faf3cc303f63cdcdaa9b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|
Security for gitpush-tool 0.4.3
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.