gitpush-tool 0.4.1__tar.gz → 0.4.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {gitpush_tool-0.4.1 → gitpush_tool-0.4.3}/LONG_DESCRIPTION.md +144 -142
- {gitpush_tool-0.4.1/gitpush_tool.egg-info → gitpush_tool-0.4.3}/PKG-INFO +3 -1
- {gitpush_tool-0.4.1 → gitpush_tool-0.4.3}/README.md +234 -182
- {gitpush_tool-0.4.1 → gitpush_tool-0.4.3}/gitpush/__doc__.py +7 -2
- gitpush_tool-0.4.3/gitpush/__init__.py +1 -0
- {gitpush_tool-0.4.1 → gitpush_tool-0.4.3}/gitpush/cli.py +852 -816
- gitpush_tool-0.4.3/gitpush/sync.py +524 -0
- gitpush_tool-0.4.3/gitpush/undo.py +359 -0
- {gitpush_tool-0.4.1 → gitpush_tool-0.4.3/gitpush_tool.egg-info}/PKG-INFO +3 -1
- {gitpush_tool-0.4.1 → gitpush_tool-0.4.3}/gitpush_tool.egg-info/SOURCES.txt +5 -1
- {gitpush_tool-0.4.1 → gitpush_tool-0.4.3}/gitpush_tool.egg-info/entry_points.txt +2 -0
- {gitpush_tool-0.4.1 → gitpush_tool-0.4.3}/setup.py +4 -2
- gitpush_tool-0.4.3/tests/test_sync.py +153 -0
- gitpush_tool-0.4.3/tests/test_undo.py +80 -0
- gitpush_tool-0.4.1/gitpush/__init__.py +0 -1
- {gitpush_tool-0.4.1 → gitpush_tool-0.4.3}/LICENSE +0 -0
- {gitpush_tool-0.4.1 → gitpush_tool-0.4.3}/MANIFEST.in +0 -0
- {gitpush_tool-0.4.1 → gitpush_tool-0.4.3}/gitpush/safety.py +0 -0
- {gitpush_tool-0.4.1 → gitpush_tool-0.4.3}/gitpush/status.py +0 -0
- {gitpush_tool-0.4.1 → gitpush_tool-0.4.3}/gitpush_tool.egg-info/dependency_links.txt +0 -0
- {gitpush_tool-0.4.1 → gitpush_tool-0.4.3}/gitpush_tool.egg-info/top_level.txt +0 -0
- {gitpush_tool-0.4.1 → gitpush_tool-0.4.3}/pyproject.toml +0 -0
- {gitpush_tool-0.4.1 → gitpush_tool-0.4.3}/setup.cfg +0 -0
- {gitpush_tool-0.4.1 → gitpush_tool-0.4.3}/tests/test_cli.py +0 -0
- {gitpush_tool-0.4.1 → gitpush_tool-0.4.3}/tests/test_safety.py +0 -0
- {gitpush_tool-0.4.1 → gitpush_tool-0.4.3}/tests/test_status.py +0 -0
|
@@ -1,142 +1,144 @@
|
|
|
1
|
-
# GitPush Tool 🚀
|
|
2
|
-
|
|
3
|
-
[](https://pypi.org/project/gitpush-tool/)
|
|
4
|
-
[](https://github.com/inevitablegs/gitpush/blob/main/LICENSE)
|
|
5
|
-
|
|
6
|
-
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.
|
|
7
|
-
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
## ✨ Features
|
|
11
|
-
|
|
12
|
-
- **
|
|
13
|
-
- **
|
|
14
|
-
- **
|
|
15
|
-
- **
|
|
16
|
-
- **
|
|
17
|
-
- **
|
|
18
|
-
- **
|
|
19
|
-
- **
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
═══════════════════════════════════════════════════════════════
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
⚠️
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
- **`
|
|
116
|
-
- **`
|
|
117
|
-
- **`
|
|
118
|
-
- **`
|
|
119
|
-
- **`
|
|
120
|
-
- **`
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
|
129
|
-
|
|
130
|
-
| `gitpush
|
|
131
|
-
| `gitpush
|
|
132
|
-
| `gitpush
|
|
133
|
-
| `gitpush --
|
|
134
|
-
| `gitpush
|
|
135
|
-
| `gitpush --
|
|
136
|
-
| `gitpush
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
1
|
+
# GitPush Tool 🚀
|
|
2
|
+
|
|
3
|
+
[](https://pypi.org/project/gitpush-tool/)
|
|
4
|
+
[](https://github.com/inevitablegs/gitpush/blob/main/LICENSE)
|
|
5
|
+
|
|
6
|
+
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.
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## ✨ Features
|
|
11
|
+
|
|
12
|
+
- **Smart Sync Engine (`gitpush sync`):** Intelligent single-command replacement for `git pull → git add → git commit → git push`. Automatically detects repository state (clean, dirty, ahead, behind, diverged) and safely synchronizes with remote.
|
|
13
|
+
- **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.
|
|
14
|
+
- **Interactive Undo Engine (`gitpush undo`):** Reversible and safe rollback for commits and pushes with detailed previews.
|
|
15
|
+
- **Pre-Push Safety & Diffstat Preview:** See changed files, line additions/deletions (`+X, -Y`), ahead/behind status, and pending commits before pushing.
|
|
16
|
+
- **Dangerous Git Operation Guard:** Analyzes and protects against risky actions (`reset --hard`, force pushes, deleting unmerged branches, dirty `git clean`, detached HEADs).
|
|
17
|
+
- **Protected Branch Safeguard:** Automatically detects and alerts when pushing or force-pushing to `main`, `master`, `prod`, `release`, or `dev`.
|
|
18
|
+
- **One-Command GitHub Repo Creation:** Initialize Git, create a remote GitHub repo, and push in a single step via GitHub CLI (`gh`).
|
|
19
|
+
- **Safe Force Pushing:** Uses `--force-with-lease` by default to avoid overwriting teammate commits.
|
|
20
|
+
- **Dry-Run Mode:** Preview your push inspection without modifying anything.
|
|
21
|
+
- **Non-Interactive & CI Friendly:** Skip prompts with `-y` or `--yes`.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## 📊 Decision-Support Status Dashboard (`gitpush status`)
|
|
26
|
+
|
|
27
|
+
```text
|
|
28
|
+
Repository: my-project
|
|
29
|
+
Branch: feature/payment
|
|
30
|
+
Tracking: origin/feature/payment
|
|
31
|
+
|
|
32
|
+
WORKTREE
|
|
33
|
+
────────────────────────
|
|
34
|
+
Modified 4
|
|
35
|
+
Added 2
|
|
36
|
+
Deleted 1
|
|
37
|
+
Untracked 3
|
|
38
|
+
Line Changes +142, -18
|
|
39
|
+
|
|
40
|
+
COMMITS
|
|
41
|
+
────────────────────────
|
|
42
|
+
Ahead 3
|
|
43
|
+
Behind 1
|
|
44
|
+
|
|
45
|
+
PUSH / STATUS
|
|
46
|
+
────────────────────────
|
|
47
|
+
⚠ Remote has 1 commit(s) you don't have locally.
|
|
48
|
+
|
|
49
|
+
Recommended:
|
|
50
|
+
git pull --rebase
|
|
51
|
+
gitpush "Commit message"
|
|
52
|
+
|
|
53
|
+
Health:
|
|
54
|
+
82/100 [████████░░] Good (Minor Action Needed)
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## 🛡️ Pre-Push Warning & Inspection
|
|
60
|
+
|
|
61
|
+
Whenever you run `gitpush`, you get an instant, clear breakdown of your repository state:
|
|
62
|
+
|
|
63
|
+
```text
|
|
64
|
+
═══════════════════════════════════════════════════════════════
|
|
65
|
+
🚀 GITPUSH PRE-PUSH INSPECTION & SUMMARY
|
|
66
|
+
═══════════════════════════════════════════════════════════════
|
|
67
|
+
|
|
68
|
+
Repository: my-project (/Users/username/Projects/my-project)
|
|
69
|
+
Target Branch: main ⚠️ [PROTECTED BRANCH] ──> origin/main
|
|
70
|
+
Sync Status: Ahead: 2 commit(s), Behind: 0 commit(s)
|
|
71
|
+
Action: Commit: 'Add user authentication flow'
|
|
72
|
+
|
|
73
|
+
Warnings:
|
|
74
|
+
⚠️ Pushing directly to protected branch 'main'.
|
|
75
|
+
|
|
76
|
+
Changed Files (3 file(s), +84 / -12):
|
|
77
|
+
M src/auth.py (+65, -8)
|
|
78
|
+
M README.md (+19, -4)
|
|
79
|
+
?? config/auth.json (+12 lines, untracked)
|
|
80
|
+
|
|
81
|
+
Pending Commits to Push (2):
|
|
82
|
+
• 8f3d1a2 Initial auth scaffold
|
|
83
|
+
• 4e9c7b1 Implement JWT token verification
|
|
84
|
+
═══════════════════════════════════════════════════════════════
|
|
85
|
+
|
|
86
|
+
Continue? [y/N]:
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## 🛑 Dangerous Command Guard
|
|
92
|
+
|
|
93
|
+
Use `gitpush guard <command>` (or `gitpush-guard <command>`) before executing risky Git operations:
|
|
94
|
+
|
|
95
|
+
```text
|
|
96
|
+
Command: [WARNING ⚠️]
|
|
97
|
+
git reset --hard HEAD~5
|
|
98
|
+
|
|
99
|
+
Changes that may be lost:
|
|
100
|
+
5 commit(s)
|
|
101
|
+
12 modified/staged file(s)
|
|
102
|
+
|
|
103
|
+
Risks & Warnings:
|
|
104
|
+
⚠️ All uncommitted changes in tracked files will be permanently discarded.
|
|
105
|
+
⚠️ 12 uncommitted modified/staged file(s) will be lost immediately.
|
|
106
|
+
⚠️ 5 commit(s) will be unlinked from current branch HEAD.
|
|
107
|
+
|
|
108
|
+
Repository:
|
|
109
|
+
my-project
|
|
110
|
+
|
|
111
|
+
Continue? [y/N]:
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### What Guard Detects:
|
|
115
|
+
- **`reset --hard`**: Identifies uncommitted files and commits that will be orphaned.
|
|
116
|
+
- **`force push`**: Detects remote overwrite risks and protected branch overrides.
|
|
117
|
+
- **`deleting branches`**: Identifies unmerged commits that would be lost.
|
|
118
|
+
- **`cleaning untracked files`**: Warns of files/directories `git clean -fd` will permanently delete.
|
|
119
|
+
- **`checkout / restore`**: Flags uncommitted modifications about to be discarded.
|
|
120
|
+
- **`rebasing with uncommitted work`**: Warns of dirty working trees before rebase conflicts occur.
|
|
121
|
+
- **`pushing to protected branches`**: Direct pushes to `main`, `master`, `prod`, `dev`, etc.
|
|
122
|
+
- **`detached HEAD situations`**: Warns when working or committing on detached HEADs.
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## 🛠️ Usage & Commands
|
|
127
|
+
|
|
128
|
+
| Command | Description |
|
|
129
|
+
|---|---|
|
|
130
|
+
| `gitpush "Commit message"` | Stages all changes, previews diffs, commits, and pushes. |
|
|
131
|
+
| `gitpush` | Pushes staged/unpushed changes with safety preview. |
|
|
132
|
+
| `gitpush -y` | Pushes immediately without confirmation prompt. |
|
|
133
|
+
| `gitpush --dry-run` | Shows the pre-push inspection and exits without changes. |
|
|
134
|
+
| `gitpush --force` | Safe force push using `--force-with-lease`. |
|
|
135
|
+
| `gitpush --tags` | Pushes all local tags. |
|
|
136
|
+
| `gitpush guard <git command>` | Inspects and guards any dangerous Git command. |
|
|
137
|
+
| `gitpush --init` | Initializes Git repo and creates default `.gitignore`. |
|
|
138
|
+
| `gitpush --new-repo <name>` | Creates a new GitHub repo and pushes in one step. |
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
## 📄 License
|
|
143
|
+
|
|
144
|
+
MIT License. See [LICENSE](https://github.com/inevitablegs/gitpush/blob/main/LICENSE) for details.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: gitpush-tool
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.3
|
|
4
4
|
Summary: Supercharged Git push tool with automatic GitHub repo creation and pushing
|
|
5
5
|
Home-page: https://github.com/inevitablegs/gitpush
|
|
6
6
|
Author: Ganesh Sonawane
|
|
@@ -38,7 +38,9 @@ A supercharged Git CLI and safety tool that simplifies repository creation and p
|
|
|
38
38
|
|
|
39
39
|
## ✨ Features
|
|
40
40
|
|
|
41
|
+
- **Smart Sync Engine (`gitpush sync`):** Intelligent single-command replacement for `git pull → git add → git commit → git push`. Automatically detects repository state (clean, dirty, ahead, behind, diverged) and safely synchronizes with remote.
|
|
41
42
|
- **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.
|
|
43
|
+
- **Interactive Undo Engine (`gitpush undo`):** Reversible and safe rollback for commits and pushes with detailed previews.
|
|
42
44
|
- **Pre-Push Safety & Diffstat Preview:** See changed files, line additions/deletions (`+X, -Y`), ahead/behind status, and pending commits before pushing.
|
|
43
45
|
- **Dangerous Git Operation Guard:** Analyzes and protects against risky actions (`reset --hard`, force pushes, deleting unmerged branches, dirty `git clean`, detached HEADs).
|
|
44
46
|
- **Protected Branch Safeguard:** Automatically detects and alerts when pushing or force-pushing to `main`, `master`, `prod`, `release`, or `dev`.
|