pygitgo 1.6.1__tar.gz → 1.7.0__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.
- {pygitgo-1.6.1/src/pygitgo.egg-info → pygitgo-1.7.0}/PKG-INFO +86 -68
- {pygitgo-1.6.1 → pygitgo-1.7.0}/README.md +85 -68
- {pygitgo-1.6.1 → pygitgo-1.7.0}/pyproject.toml +6 -1
- {pygitgo-1.6.1 → pygitgo-1.7.0}/src/pygitgo/auth/account.py +18 -10
- {pygitgo-1.6.1 → pygitgo-1.7.0}/src/pygitgo/auth/manager.py +31 -10
- pygitgo-1.7.0/src/pygitgo/auth/ssh_utils.py +140 -0
- pygitgo-1.7.0/src/pygitgo/commands/config.py +27 -0
- pygitgo-1.7.0/src/pygitgo/commands/git_branch.py +55 -0
- pygitgo-1.7.0/src/pygitgo/commands/git_core.py +78 -0
- pygitgo-1.7.0/src/pygitgo/commands/git_remote.py +67 -0
- pygitgo-1.7.0/src/pygitgo/commands/jump.py +159 -0
- pygitgo-1.7.0/src/pygitgo/commands/link.py +116 -0
- pygitgo-1.7.0/src/pygitgo/commands/pull.py +75 -0
- pygitgo-1.7.0/src/pygitgo/commands/push.py +153 -0
- {pygitgo-1.6.1 → pygitgo-1.7.0}/src/pygitgo/commands/staging.py +5 -6
- pygitgo-1.7.0/src/pygitgo/commands/stash.py +69 -0
- pygitgo-1.7.0/src/pygitgo/commands/state.py +236 -0
- pygitgo-1.7.0/src/pygitgo/commands/undo.py +61 -0
- pygitgo-1.7.0/src/pygitgo/commands/user.py +35 -0
- pygitgo-1.7.0/src/pygitgo/main.py +191 -0
- pygitgo-1.6.1/src/pygitgo/utils/setup.py → pygitgo-1.7.0/src/pygitgo/utils/bootstrap.py +3 -3
- pygitgo-1.7.0/src/pygitgo/utils/colors.py +34 -0
- pygitgo-1.7.0/src/pygitgo/utils/config.py +29 -0
- {pygitgo-1.6.1 → pygitgo-1.7.0}/src/pygitgo/utils/executor.py +11 -24
- pygitgo-1.7.0/src/pygitgo/utils/platform.py +27 -0
- pygitgo-1.7.0/src/pygitgo/utils/validators.py +10 -0
- {pygitgo-1.6.1 → pygitgo-1.7.0/src/pygitgo.egg-info}/PKG-INFO +86 -68
- {pygitgo-1.6.1 → pygitgo-1.7.0}/src/pygitgo.egg-info/SOURCES.txt +25 -8
- {pygitgo-1.6.1 → pygitgo-1.7.0}/src/pygitgo.egg-info/requires.txt +1 -0
- pygitgo-1.7.0/tests/test_account.py +74 -0
- pygitgo-1.6.1/tests/test_setup.py → pygitgo-1.7.0/tests/test_bootstrap.py +16 -17
- pygitgo-1.7.0/tests/test_config_command.py +46 -0
- pygitgo-1.7.0/tests/test_config_utils.py +57 -0
- pygitgo-1.7.0/tests/test_git_branch.py +103 -0
- pygitgo-1.7.0/tests/test_git_core.py +172 -0
- pygitgo-1.7.0/tests/test_git_remote.py +195 -0
- pygitgo-1.7.0/tests/test_jump.py +257 -0
- pygitgo-1.7.0/tests/test_link.py +106 -0
- pygitgo-1.7.0/tests/test_manager.py +79 -0
- {pygitgo-1.6.1 → pygitgo-1.7.0}/tests/test_platform.py +3 -3
- pygitgo-1.7.0/tests/test_pull.py +129 -0
- pygitgo-1.7.0/tests/test_push.py +176 -0
- pygitgo-1.7.0/tests/test_ssh_utils.py +120 -0
- {pygitgo-1.6.1 → pygitgo-1.7.0}/tests/test_staging.py +2 -1
- pygitgo-1.7.0/tests/test_stash.py +151 -0
- pygitgo-1.7.0/tests/test_state.py +226 -0
- {pygitgo-1.6.1 → pygitgo-1.7.0}/tests/test_undo.py +17 -26
- pygitgo-1.7.0/tests/test_user.py +55 -0
- pygitgo-1.6.1/tests/test_main.py → pygitgo-1.7.0/tests/test_validators.py +9 -8
- pygitgo-1.6.1/src/pygitgo/auth/ssh_utils.py +0 -119
- pygitgo-1.6.1/src/pygitgo/commands/git_operations.py +0 -180
- pygitgo-1.6.1/src/pygitgo/commands/jump.py +0 -107
- pygitgo-1.6.1/src/pygitgo/commands/pull.py +0 -43
- pygitgo-1.6.1/src/pygitgo/commands/state.py +0 -177
- pygitgo-1.6.1/src/pygitgo/commands/undo.py +0 -53
- pygitgo-1.6.1/src/pygitgo/main.py +0 -370
- pygitgo-1.6.1/src/pygitgo/utils/colors.py +0 -22
- pygitgo-1.6.1/src/pygitgo/utils/config.py +0 -56
- pygitgo-1.6.1/src/pygitgo/utils/platform_utils.py +0 -172
- pygitgo-1.6.1/tests/test_config.py +0 -99
- pygitgo-1.6.1/tests/test_git_operations.py +0 -473
- pygitgo-1.6.1/tests/test_jump.py +0 -275
- pygitgo-1.6.1/tests/test_pull.py +0 -77
- pygitgo-1.6.1/tests/test_state.py +0 -227
- pygitgo-1.6.1/tests/test_url_validator.py +0 -42
- {pygitgo-1.6.1 → pygitgo-1.7.0}/LICENSE +0 -0
- {pygitgo-1.6.1 → pygitgo-1.7.0}/setup.cfg +0 -0
- {pygitgo-1.6.1 → pygitgo-1.7.0}/src/pygitgo/__init__.py +0 -0
- {pygitgo-1.6.1 → pygitgo-1.7.0}/src/pygitgo/auth/__init__.py +0 -0
- {pygitgo-1.6.1 → pygitgo-1.7.0}/src/pygitgo/commands/__init__.py +0 -0
- {pygitgo-1.6.1 → pygitgo-1.7.0}/src/pygitgo/exceptions.py +0 -0
- {pygitgo-1.6.1 → pygitgo-1.7.0}/src/pygitgo/utils/__init__.py +0 -0
- {pygitgo-1.6.1 → pygitgo-1.7.0}/src/pygitgo/utils/update_checker.py +0 -0
- {pygitgo-1.6.1 → pygitgo-1.7.0}/src/pygitgo.egg-info/dependency_links.txt +0 -0
- {pygitgo-1.6.1 → pygitgo-1.7.0}/src/pygitgo.egg-info/entry_points.txt +0 -0
- {pygitgo-1.6.1 → pygitgo-1.7.0}/src/pygitgo.egg-info/top_level.txt +0 -0
- {pygitgo-1.6.1 → pygitgo-1.7.0}/tests/test_update_checker.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pygitgo
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.7.0
|
|
4
4
|
Summary: GitGo CLI - Your Fast Git Companion. Simplifies git push, link, stash, and user management.
|
|
5
5
|
Author: Huerte
|
|
6
6
|
License: GPL-3.0-or-later
|
|
@@ -20,11 +20,12 @@ Requires-Dist: pick>=2.0
|
|
|
20
20
|
Provides-Extra: dev
|
|
21
21
|
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
22
22
|
Requires-Dist: pytest-mock>=3.10; extra == "dev"
|
|
23
|
+
Requires-Dist: pytest-cov>=4.0; extra == "dev"
|
|
23
24
|
Dynamic: license-file
|
|
24
25
|
|
|
25
26
|
<div align="center">
|
|
26
27
|
|
|
27
|
-
|
|
28
|
+

|
|
28
29
|
|
|
29
30
|
[](https://github.com/Huerte/GitGo/actions)
|
|
30
31
|
[](https://pypi.org/project/pygitgo)
|
|
@@ -38,11 +39,19 @@ Dynamic: license-file
|
|
|
38
39
|
|
|
39
40
|
<a href="https://github.com/Huerte/GitGo/issues">Report Bug</a> · <a href="https://github.com/Huerte/GitGo/issues">Request Feature</a>
|
|
40
41
|
|
|
42
|
+
<br />
|
|
43
|
+
|
|
44
|
+
If GitGo saves you time, consider buying me a coffee. It helps keep the project going.
|
|
45
|
+
|
|
46
|
+
<a href="https://ko-fi.com/huerte">
|
|
47
|
+
<img src="https://ko-fi.com/img/githubbutton_sm.svg" alt="Support on Ko-fi" />
|
|
48
|
+
</a>
|
|
49
|
+
|
|
41
50
|
</div>
|
|
42
51
|
|
|
43
52
|
---
|
|
44
53
|
|
|
45
|
-
GitGo wraps your most
|
|
54
|
+
GitGo wraps your most-typed git commands into shorter ones. It covers init, add, commit, push, branch, and stash. It also includes features most wrappers leave out: SSH key setup, HTTPS-to-SSH conversion, and a named stash interface called state management.
|
|
46
55
|
|
|
47
56
|
```bash
|
|
48
57
|
# Instead of this:
|
|
@@ -63,7 +72,10 @@ gitgo link https://github.com/username/repo.git "init"
|
|
|
63
72
|
- [Command Reference](#command-reference)
|
|
64
73
|
- [How It Works](#how-it-works)
|
|
65
74
|
- [Contributing](#contributing)
|
|
75
|
+
- [Credits](#credits)
|
|
66
76
|
- [License](#license)
|
|
77
|
+
- [Changelog](CHANGELOG.md)
|
|
78
|
+
- [Contributing Guide](CONTRIBUTING.md)
|
|
67
79
|
|
|
68
80
|
---
|
|
69
81
|
|
|
@@ -75,17 +87,16 @@ gitgo link https://github.com/username/repo.git "init"
|
|
|
75
87
|
|
|
76
88
|
## Features
|
|
77
89
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
- **
|
|
81
|
-
- **
|
|
82
|
-
- **
|
|
83
|
-
- **
|
|
84
|
-
- **
|
|
85
|
-
- **
|
|
86
|
-
- **
|
|
87
|
-
- **
|
|
88
|
-
- **Termux Compatibility:** Works natively on Android natively handling common issues like dubious ownership errors.
|
|
90
|
+
- **Single commands for linking, pushing, and stashing.** No more chaining five commands together.
|
|
91
|
+
- **Undo:** Roll back commits, unstage files, or discard local changes. The subcommands say what they do: `undo commit`, `undo add`, `undo changes`.
|
|
92
|
+
- **Branch switching with `jump`:** Stashes your uncommitted work, moves to the target branch, syncs with main, and pops the stash. If a merge conflict occurs, the Try-and-Revert engine offers to roll the whole operation back.
|
|
93
|
+
- **State management:** Named, indexed stash. Run `state list` to see what you saved. No more `stash@{2}` archaeology.
|
|
94
|
+
- **Custom defaults:** Store your preferred branch name and default commit message. GitGo picks them up on every run.
|
|
95
|
+
- **Auto-update checker:** Checks PyPI for newer versions in a background thread. Results are cached for 7 days so startup isn't delayed.
|
|
96
|
+
- **SSH auto-setup & signing:** Generates an `ed25519` key, loads it into `ssh-agent`, opens your GitHub SSH settings page, and automatically signs all future commits for the verified badge.
|
|
97
|
+
- **HTTPS-to-SSH conversion:** Detects HTTPS remotes and rewrites them before pushing if SSH is configured. No manual `git remote set-url`.
|
|
98
|
+
- **Termux support:** Detects the Termux environment, adjusts install paths, uses `termux-open` for browser actions, and patches the dubious ownership Git error.
|
|
99
|
+
- **Safe interruptions:** Hitting `Ctrl+C` midway through a command automatically aborts in-progress merges, cleans up partial states, and tells you exactly what was and wasn't saved.
|
|
89
100
|
|
|
90
101
|
---
|
|
91
102
|
|
|
@@ -94,16 +105,34 @@ GitGo provides a CLI environment designed for faster and simpler Git workflows.
|
|
|
94
105
|
### Prerequisites
|
|
95
106
|
|
|
96
107
|
- **Python 3.8+**
|
|
97
|
-
- **Git 2.x
|
|
98
|
-
- **OpenSSH
|
|
108
|
+
- **Git 2.x+**: [git-scm.com](https://git-scm.com)
|
|
109
|
+
- **OpenSSH**: required for `gitgo user login` (pre-installed on most systems)
|
|
99
110
|
- A **GitHub account**
|
|
100
111
|
|
|
101
112
|
### Install from PyPI
|
|
102
113
|
|
|
114
|
+
For Windows users or environments without global pip restrictions:
|
|
115
|
+
|
|
103
116
|
```bash
|
|
104
117
|
pip install pygitgo
|
|
105
118
|
```
|
|
106
119
|
|
|
120
|
+
*(Alternatively, use `pipx install pygitgo` for an isolated environment.)*
|
|
121
|
+
|
|
122
|
+
### Install via pipx (Cross-Platform)
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
pipx install pygitgo
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### Quick Install (Linux & macOS)
|
|
129
|
+
|
|
130
|
+
The install script creates an isolated environment and places `gitgo` in `~/.local/bin`. Useful for PEP 668-enforced systems:
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
curl -sSL https://raw.githubusercontent.com/Huerte/GitGo/main/install.sh | bash
|
|
134
|
+
```
|
|
135
|
+
|
|
107
136
|
Verify the installation:
|
|
108
137
|
|
|
109
138
|
```bash
|
|
@@ -125,49 +154,59 @@ pip install -e .
|
|
|
125
154
|
## Usage
|
|
126
155
|
|
|
127
156
|
### 1. Set Up Your Identity
|
|
128
|
-
|
|
157
|
+
|
|
158
|
+
Run this once on a new machine. GitGo generates an SSH key, adds it to `ssh-agent`, prints the public key, and opens your GitHub SSH settings page so you can add it for both authentication and commit signing.
|
|
159
|
+
|
|
129
160
|
```bash
|
|
130
161
|
gitgo user login
|
|
131
162
|
```
|
|
132
163
|
|
|
133
164
|
### 2. Link a New Project to GitHub
|
|
134
|
-
|
|
165
|
+
|
|
166
|
+
Point GitGo at an existing empty GitHub repo. It initializes Git, stages everything, commits, and pushes — including pulling unrelated histories if the remote isn't empty.
|
|
167
|
+
|
|
135
168
|
```bash
|
|
136
169
|
gitgo link https://github.com/username/repo.git "Initial commit"
|
|
137
170
|
```
|
|
138
171
|
|
|
139
172
|
### 3. Push Changes
|
|
173
|
+
|
|
140
174
|
```bash
|
|
141
175
|
# Push to an existing branch
|
|
142
176
|
gitgo push main "Fix auth bug"
|
|
143
177
|
|
|
144
178
|
# Create a new branch and push
|
|
145
|
-
gitgo push -n
|
|
179
|
+
gitgo push -n feat/login "Add login flow"
|
|
146
180
|
```
|
|
147
181
|
|
|
148
|
-
### 4.
|
|
149
|
-
|
|
182
|
+
### 4. Switch Branches
|
|
183
|
+
|
|
184
|
+
Switch branches with uncommitted work in progress. `jump` stashes your changes, moves to the target branch, syncs with main, and pops the stash. If the pop triggers a conflict, it offers to abort and restore the repo to its prior state.
|
|
185
|
+
|
|
150
186
|
```bash
|
|
151
|
-
gitgo jump
|
|
187
|
+
gitgo jump feat/new-login
|
|
152
188
|
```
|
|
153
189
|
|
|
154
|
-
### 5.
|
|
155
|
-
|
|
190
|
+
### 5. Undo Mistakes
|
|
191
|
+
|
|
192
|
+
Undo recent mistakes with commands named for what they undo.
|
|
193
|
+
|
|
156
194
|
```bash
|
|
157
|
-
gitgo undo commit # Undo the last commit (files stay
|
|
158
|
-
gitgo undo add #
|
|
159
|
-
gitgo undo changes # DANGER: permanently
|
|
195
|
+
gitgo undo commit # Undo the last commit (files stay staged)
|
|
196
|
+
gitgo undo add # Unstage files
|
|
197
|
+
gitgo undo changes # DANGER: permanently discard all uncommitted edits
|
|
160
198
|
```
|
|
161
199
|
|
|
162
200
|
### 6. Save Your Work-in-Progress
|
|
201
|
+
|
|
163
202
|
```bash
|
|
164
203
|
gitgo state save "halfway through refactor"
|
|
165
204
|
gitgo state list
|
|
166
205
|
gitgo state load 1
|
|
167
206
|
```
|
|
168
207
|
|
|
169
|
-
###
|
|
170
|
-
|
|
208
|
+
### 7. Custom Defaults
|
|
209
|
+
|
|
171
210
|
```bash
|
|
172
211
|
gitgo config set default-branch develop
|
|
173
212
|
gitgo config set default-message "WIP: updates"
|
|
@@ -180,7 +219,7 @@ gitgo config get default-branch
|
|
|
180
219
|
|
|
181
220
|
### `gitgo push`
|
|
182
221
|
|
|
183
|
-
|
|
222
|
+
Stage, commit, and push in one command.
|
|
184
223
|
|
|
185
224
|
```bash
|
|
186
225
|
gitgo push [branch] [message]
|
|
@@ -194,22 +233,22 @@ gitgo push -s [branch] [message] # interactively select files to stage
|
|
|
194
233
|
| Flag | Description |
|
|
195
234
|
|------|-------------|
|
|
196
235
|
| `-n`, `--new` | Create a new branch before pushing |
|
|
197
|
-
| `-s`, `--select` | Interactively select which files
|
|
236
|
+
| `-s`, `--select` | Interactively select which files to include in the push |
|
|
198
237
|
|
|
199
238
|
If there are no new changes but unpushed commits exist, GitGo detects this and pushes without creating an empty commit.
|
|
200
239
|
|
|
201
240
|
### `gitgo pull`
|
|
202
241
|
|
|
203
|
-
|
|
242
|
+
Pulls updates from the remote. Stashes any uncommitted work first, runs a rebase pull, then pops the stash.
|
|
204
243
|
|
|
205
244
|
```bash
|
|
206
|
-
gitgo pull #
|
|
207
|
-
gitgo pull <branch> #
|
|
245
|
+
gitgo pull # Pull updates for the current branch
|
|
246
|
+
gitgo pull <branch> # Pull updates from a specific branch
|
|
208
247
|
```
|
|
209
248
|
|
|
210
249
|
### `gitgo link`
|
|
211
250
|
|
|
212
|
-
Initializes a Git repository
|
|
251
|
+
Initializes a Git repository, connects it to a remote, and pushes. Works on already-initialized repos and handles unrelated histories.
|
|
213
252
|
|
|
214
253
|
```bash
|
|
215
254
|
gitgo link <github_repo_url> [commit_message]
|
|
@@ -217,7 +256,7 @@ gitgo link <github_repo_url> [commit_message]
|
|
|
217
256
|
|
|
218
257
|
### `gitgo jump`
|
|
219
258
|
|
|
220
|
-
|
|
259
|
+
Switches branches with uncommitted work in progress. Stashes changes, moves to the target branch, pulls from main, and pops the stash. If the pop triggers a merge conflict, the Try-and-Revert engine offers to abort the entire operation and restore the repo to the state it was in before the command ran.
|
|
221
260
|
|
|
222
261
|
```bash
|
|
223
262
|
gitgo jump <branch>
|
|
@@ -225,17 +264,17 @@ gitgo jump <branch>
|
|
|
225
264
|
|
|
226
265
|
### `gitgo undo`
|
|
227
266
|
|
|
228
|
-
|
|
267
|
+
Undo recent actions with subcommands named for what they undo.
|
|
229
268
|
|
|
230
269
|
```bash
|
|
231
|
-
gitgo undo commit # Undo
|
|
232
|
-
gitgo undo add #
|
|
233
|
-
gitgo undo changes # Permanently
|
|
270
|
+
gitgo undo commit # Undo the last commit without losing files
|
|
271
|
+
gitgo undo add # Unstage files
|
|
272
|
+
gitgo undo changes # Permanently discard all new files and uncommitted edits
|
|
234
273
|
```
|
|
235
274
|
|
|
236
275
|
### `gitgo state`
|
|
237
276
|
|
|
238
|
-
|
|
277
|
+
Named, indexed interface over `git stash`.
|
|
239
278
|
|
|
240
279
|
```bash
|
|
241
280
|
gitgo state list # show all saved states
|
|
@@ -244,6 +283,7 @@ gitgo state load [id] # restore a state by index
|
|
|
244
283
|
gitgo state delete [id] # delete a state by index
|
|
245
284
|
gitgo state delete -a # delete all saved states
|
|
246
285
|
```
|
|
286
|
+
|
|
247
287
|
*Short aliases:* `-l`, `-s`, `-o`, `-d`
|
|
248
288
|
|
|
249
289
|
### `gitgo user`
|
|
@@ -281,23 +321,17 @@ gitgo -r # verify GitGo is ready
|
|
|
281
321
|
|
|
282
322
|
## How It Works
|
|
283
323
|
|
|
284
|
-
- **SSH Auto-Setup:** `gitgo user login` generates an `ed25519` SSH key
|
|
285
|
-
- **HTTPS to SSH Conversion:** If your remote is set to HTTPS, GitGo
|
|
324
|
+
- **SSH Auto-Setup & Signing:** `gitgo user login` generates an `ed25519` SSH key and prompts you to add it to GitHub twice (for authentication and signing). GitGo then injects temporary `-c` flags into every commit to automatically sign them with this key, without touching your global git config.
|
|
325
|
+
- **HTTPS to SSH Conversion:** If your remote is set to HTTPS and SSH is configured, GitGo rewrites the remote before pushing. No `git remote set-url` required.
|
|
286
326
|
- **Auto-Update Checker:** Spawns a non-blocking background thread on startup to query PyPI for newer versions. Results are cached locally for 7 days to prevent unnecessary network requests.
|
|
287
|
-
- **Termux Compatibility:** Detects Termux via environment variables, adjusts binary locations (`$PREFIX/bin`), uses `termux-open` for browser actions, and
|
|
327
|
+
- **Termux Compatibility:** Detects Termux via environment variables, adjusts binary locations (`$PREFIX/bin`), uses `termux-open` for browser actions, and patches the `detected dubious ownership` Git error.
|
|
288
328
|
- **State Management:** `gitgo state` wraps `git stash` with named saves, indexed listing, and confirmation prompts.
|
|
289
329
|
|
|
290
330
|
---
|
|
291
331
|
|
|
292
332
|
## Contributing
|
|
293
333
|
|
|
294
|
-
Contributions are welcome and
|
|
295
|
-
|
|
296
|
-
1. Fork the Project
|
|
297
|
-
2. Create a Feature Branch (`git checkout -b feature/your-feature`)
|
|
298
|
-
3. Commit Changes
|
|
299
|
-
4. Push to the Branch (`git push origin feature/your-feature`)
|
|
300
|
-
5. Open a Pull Request
|
|
334
|
+
Contributions are welcome. Read [CONTRIBUTING.md](CONTRIBUTING.md) for the full guide, including project structure, test instructions, commit conventions, and a [Good First Issues](CONTRIBUTING.md#good-first-issues) table if you're not sure where to start.
|
|
301
335
|
|
|
302
336
|
---
|
|
303
337
|
|
|
@@ -307,31 +341,15 @@ Contributions are welcome and appreciated!
|
|
|
307
341
|
<table>
|
|
308
342
|
<tr>
|
|
309
343
|
<td align="center"><a href="https://github.com/Huerte"><img src="https://github.com/Huerte.png" width="80px;" alt=""/></a><br /><a href="https://github.com/Huerte"><b>Huerte</b></a><br />Creator</td>
|
|
310
|
-
<td align="center"><a href="https://github.com/Venomous-pie"><img src="https://github.com/Venomous-pie.png" width="80px;" alt=""/></a><br /><a href="https://github.com/Venomous-pie"><b>Venomous-pie</b></a><br />
|
|
344
|
+
<td align="center"><a href="https://github.com/Venomous-pie"><img src="https://github.com/Venomous-pie.png" width="80px;" alt=""/></a><br /><a href="https://github.com/Venomous-pie"><b>Venomous-pie</b></a><br />Contributor</td>
|
|
311
345
|
</tr>
|
|
312
346
|
</table>
|
|
313
347
|
</div>
|
|
314
348
|
|
|
315
349
|
---
|
|
316
350
|
|
|
317
|
-
## Support
|
|
318
|
-
|
|
319
|
-
If GitGo saves you time, consider buying me a coffee. It helps keep the project going.
|
|
320
|
-
|
|
321
|
-
<div align="center">
|
|
322
|
-
<a href="https://ko-fi.com/huerte">
|
|
323
|
-
<img src="https://ko-fi.com/img/githubbutton_sm.svg" alt="Support on Ko-fi" />
|
|
324
|
-
</a>
|
|
325
|
-
</div>
|
|
326
|
-
|
|
327
|
-
---
|
|
328
|
-
|
|
329
351
|
## License
|
|
330
352
|
|
|
331
353
|
Distributed under the **GPLv3** License. See [`LICENSE`](LICENSE) for details.
|
|
332
354
|
|
|
333
355
|
---
|
|
334
|
-
|
|
335
|
-
<div align="center">
|
|
336
|
-
<sub>Created by <a href="https://github.com/Huerte">Huerte</a> with core contributions from <a href="https://github.com/Venomous-pie">Venomous-pie</a></sub>
|
|
337
|
-
</div>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<div align="center">
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+

|
|
4
4
|
|
|
5
5
|
[](https://github.com/Huerte/GitGo/actions)
|
|
6
6
|
[](https://pypi.org/project/pygitgo)
|
|
@@ -14,11 +14,19 @@
|
|
|
14
14
|
|
|
15
15
|
<a href="https://github.com/Huerte/GitGo/issues">Report Bug</a> · <a href="https://github.com/Huerte/GitGo/issues">Request Feature</a>
|
|
16
16
|
|
|
17
|
+
<br />
|
|
18
|
+
|
|
19
|
+
If GitGo saves you time, consider buying me a coffee. It helps keep the project going.
|
|
20
|
+
|
|
21
|
+
<a href="https://ko-fi.com/huerte">
|
|
22
|
+
<img src="https://ko-fi.com/img/githubbutton_sm.svg" alt="Support on Ko-fi" />
|
|
23
|
+
</a>
|
|
24
|
+
|
|
17
25
|
</div>
|
|
18
26
|
|
|
19
27
|
---
|
|
20
28
|
|
|
21
|
-
GitGo wraps your most
|
|
29
|
+
GitGo wraps your most-typed git commands into shorter ones. It covers init, add, commit, push, branch, and stash. It also includes features most wrappers leave out: SSH key setup, HTTPS-to-SSH conversion, and a named stash interface called state management.
|
|
22
30
|
|
|
23
31
|
```bash
|
|
24
32
|
# Instead of this:
|
|
@@ -39,7 +47,10 @@ gitgo link https://github.com/username/repo.git "init"
|
|
|
39
47
|
- [Command Reference](#command-reference)
|
|
40
48
|
- [How It Works](#how-it-works)
|
|
41
49
|
- [Contributing](#contributing)
|
|
50
|
+
- [Credits](#credits)
|
|
42
51
|
- [License](#license)
|
|
52
|
+
- [Changelog](CHANGELOG.md)
|
|
53
|
+
- [Contributing Guide](CONTRIBUTING.md)
|
|
43
54
|
|
|
44
55
|
---
|
|
45
56
|
|
|
@@ -51,17 +62,16 @@ gitgo link https://github.com/username/repo.git "init"
|
|
|
51
62
|
|
|
52
63
|
## Features
|
|
53
64
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
- **
|
|
57
|
-
- **
|
|
58
|
-
- **
|
|
59
|
-
- **
|
|
60
|
-
- **
|
|
61
|
-
- **
|
|
62
|
-
- **
|
|
63
|
-
- **
|
|
64
|
-
- **Termux Compatibility:** Works natively on Android natively handling common issues like dubious ownership errors.
|
|
65
|
+
- **Single commands for linking, pushing, and stashing.** No more chaining five commands together.
|
|
66
|
+
- **Undo:** Roll back commits, unstage files, or discard local changes. The subcommands say what they do: `undo commit`, `undo add`, `undo changes`.
|
|
67
|
+
- **Branch switching with `jump`:** Stashes your uncommitted work, moves to the target branch, syncs with main, and pops the stash. If a merge conflict occurs, the Try-and-Revert engine offers to roll the whole operation back.
|
|
68
|
+
- **State management:** Named, indexed stash. Run `state list` to see what you saved. No more `stash@{2}` archaeology.
|
|
69
|
+
- **Custom defaults:** Store your preferred branch name and default commit message. GitGo picks them up on every run.
|
|
70
|
+
- **Auto-update checker:** Checks PyPI for newer versions in a background thread. Results are cached for 7 days so startup isn't delayed.
|
|
71
|
+
- **SSH auto-setup & signing:** Generates an `ed25519` key, loads it into `ssh-agent`, opens your GitHub SSH settings page, and automatically signs all future commits for the verified badge.
|
|
72
|
+
- **HTTPS-to-SSH conversion:** Detects HTTPS remotes and rewrites them before pushing if SSH is configured. No manual `git remote set-url`.
|
|
73
|
+
- **Termux support:** Detects the Termux environment, adjusts install paths, uses `termux-open` for browser actions, and patches the dubious ownership Git error.
|
|
74
|
+
- **Safe interruptions:** Hitting `Ctrl+C` midway through a command automatically aborts in-progress merges, cleans up partial states, and tells you exactly what was and wasn't saved.
|
|
65
75
|
|
|
66
76
|
---
|
|
67
77
|
|
|
@@ -70,16 +80,34 @@ GitGo provides a CLI environment designed for faster and simpler Git workflows.
|
|
|
70
80
|
### Prerequisites
|
|
71
81
|
|
|
72
82
|
- **Python 3.8+**
|
|
73
|
-
- **Git 2.x
|
|
74
|
-
- **OpenSSH
|
|
83
|
+
- **Git 2.x+**: [git-scm.com](https://git-scm.com)
|
|
84
|
+
- **OpenSSH**: required for `gitgo user login` (pre-installed on most systems)
|
|
75
85
|
- A **GitHub account**
|
|
76
86
|
|
|
77
87
|
### Install from PyPI
|
|
78
88
|
|
|
89
|
+
For Windows users or environments without global pip restrictions:
|
|
90
|
+
|
|
79
91
|
```bash
|
|
80
92
|
pip install pygitgo
|
|
81
93
|
```
|
|
82
94
|
|
|
95
|
+
*(Alternatively, use `pipx install pygitgo` for an isolated environment.)*
|
|
96
|
+
|
|
97
|
+
### Install via pipx (Cross-Platform)
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
pipx install pygitgo
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### Quick Install (Linux & macOS)
|
|
104
|
+
|
|
105
|
+
The install script creates an isolated environment and places `gitgo` in `~/.local/bin`. Useful for PEP 668-enforced systems:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
curl -sSL https://raw.githubusercontent.com/Huerte/GitGo/main/install.sh | bash
|
|
109
|
+
```
|
|
110
|
+
|
|
83
111
|
Verify the installation:
|
|
84
112
|
|
|
85
113
|
```bash
|
|
@@ -101,49 +129,59 @@ pip install -e .
|
|
|
101
129
|
## Usage
|
|
102
130
|
|
|
103
131
|
### 1. Set Up Your Identity
|
|
104
|
-
|
|
132
|
+
|
|
133
|
+
Run this once on a new machine. GitGo generates an SSH key, adds it to `ssh-agent`, prints the public key, and opens your GitHub SSH settings page so you can add it for both authentication and commit signing.
|
|
134
|
+
|
|
105
135
|
```bash
|
|
106
136
|
gitgo user login
|
|
107
137
|
```
|
|
108
138
|
|
|
109
139
|
### 2. Link a New Project to GitHub
|
|
110
|
-
|
|
140
|
+
|
|
141
|
+
Point GitGo at an existing empty GitHub repo. It initializes Git, stages everything, commits, and pushes — including pulling unrelated histories if the remote isn't empty.
|
|
142
|
+
|
|
111
143
|
```bash
|
|
112
144
|
gitgo link https://github.com/username/repo.git "Initial commit"
|
|
113
145
|
```
|
|
114
146
|
|
|
115
147
|
### 3. Push Changes
|
|
148
|
+
|
|
116
149
|
```bash
|
|
117
150
|
# Push to an existing branch
|
|
118
151
|
gitgo push main "Fix auth bug"
|
|
119
152
|
|
|
120
153
|
# Create a new branch and push
|
|
121
|
-
gitgo push -n
|
|
154
|
+
gitgo push -n feat/login "Add login flow"
|
|
122
155
|
```
|
|
123
156
|
|
|
124
|
-
### 4.
|
|
125
|
-
|
|
157
|
+
### 4. Switch Branches
|
|
158
|
+
|
|
159
|
+
Switch branches with uncommitted work in progress. `jump` stashes your changes, moves to the target branch, syncs with main, and pops the stash. If the pop triggers a conflict, it offers to abort and restore the repo to its prior state.
|
|
160
|
+
|
|
126
161
|
```bash
|
|
127
|
-
gitgo jump
|
|
162
|
+
gitgo jump feat/new-login
|
|
128
163
|
```
|
|
129
164
|
|
|
130
|
-
### 5.
|
|
131
|
-
|
|
165
|
+
### 5. Undo Mistakes
|
|
166
|
+
|
|
167
|
+
Undo recent mistakes with commands named for what they undo.
|
|
168
|
+
|
|
132
169
|
```bash
|
|
133
|
-
gitgo undo commit # Undo the last commit (files stay
|
|
134
|
-
gitgo undo add #
|
|
135
|
-
gitgo undo changes # DANGER: permanently
|
|
170
|
+
gitgo undo commit # Undo the last commit (files stay staged)
|
|
171
|
+
gitgo undo add # Unstage files
|
|
172
|
+
gitgo undo changes # DANGER: permanently discard all uncommitted edits
|
|
136
173
|
```
|
|
137
174
|
|
|
138
175
|
### 6. Save Your Work-in-Progress
|
|
176
|
+
|
|
139
177
|
```bash
|
|
140
178
|
gitgo state save "halfway through refactor"
|
|
141
179
|
gitgo state list
|
|
142
180
|
gitgo state load 1
|
|
143
181
|
```
|
|
144
182
|
|
|
145
|
-
###
|
|
146
|
-
|
|
183
|
+
### 7. Custom Defaults
|
|
184
|
+
|
|
147
185
|
```bash
|
|
148
186
|
gitgo config set default-branch develop
|
|
149
187
|
gitgo config set default-message "WIP: updates"
|
|
@@ -156,7 +194,7 @@ gitgo config get default-branch
|
|
|
156
194
|
|
|
157
195
|
### `gitgo push`
|
|
158
196
|
|
|
159
|
-
|
|
197
|
+
Stage, commit, and push in one command.
|
|
160
198
|
|
|
161
199
|
```bash
|
|
162
200
|
gitgo push [branch] [message]
|
|
@@ -170,22 +208,22 @@ gitgo push -s [branch] [message] # interactively select files to stage
|
|
|
170
208
|
| Flag | Description |
|
|
171
209
|
|------|-------------|
|
|
172
210
|
| `-n`, `--new` | Create a new branch before pushing |
|
|
173
|
-
| `-s`, `--select` | Interactively select which files
|
|
211
|
+
| `-s`, `--select` | Interactively select which files to include in the push |
|
|
174
212
|
|
|
175
213
|
If there are no new changes but unpushed commits exist, GitGo detects this and pushes without creating an empty commit.
|
|
176
214
|
|
|
177
215
|
### `gitgo pull`
|
|
178
216
|
|
|
179
|
-
|
|
217
|
+
Pulls updates from the remote. Stashes any uncommitted work first, runs a rebase pull, then pops the stash.
|
|
180
218
|
|
|
181
219
|
```bash
|
|
182
|
-
gitgo pull #
|
|
183
|
-
gitgo pull <branch> #
|
|
220
|
+
gitgo pull # Pull updates for the current branch
|
|
221
|
+
gitgo pull <branch> # Pull updates from a specific branch
|
|
184
222
|
```
|
|
185
223
|
|
|
186
224
|
### `gitgo link`
|
|
187
225
|
|
|
188
|
-
Initializes a Git repository
|
|
226
|
+
Initializes a Git repository, connects it to a remote, and pushes. Works on already-initialized repos and handles unrelated histories.
|
|
189
227
|
|
|
190
228
|
```bash
|
|
191
229
|
gitgo link <github_repo_url> [commit_message]
|
|
@@ -193,7 +231,7 @@ gitgo link <github_repo_url> [commit_message]
|
|
|
193
231
|
|
|
194
232
|
### `gitgo jump`
|
|
195
233
|
|
|
196
|
-
|
|
234
|
+
Switches branches with uncommitted work in progress. Stashes changes, moves to the target branch, pulls from main, and pops the stash. If the pop triggers a merge conflict, the Try-and-Revert engine offers to abort the entire operation and restore the repo to the state it was in before the command ran.
|
|
197
235
|
|
|
198
236
|
```bash
|
|
199
237
|
gitgo jump <branch>
|
|
@@ -201,17 +239,17 @@ gitgo jump <branch>
|
|
|
201
239
|
|
|
202
240
|
### `gitgo undo`
|
|
203
241
|
|
|
204
|
-
|
|
242
|
+
Undo recent actions with subcommands named for what they undo.
|
|
205
243
|
|
|
206
244
|
```bash
|
|
207
|
-
gitgo undo commit # Undo
|
|
208
|
-
gitgo undo add #
|
|
209
|
-
gitgo undo changes # Permanently
|
|
245
|
+
gitgo undo commit # Undo the last commit without losing files
|
|
246
|
+
gitgo undo add # Unstage files
|
|
247
|
+
gitgo undo changes # Permanently discard all new files and uncommitted edits
|
|
210
248
|
```
|
|
211
249
|
|
|
212
250
|
### `gitgo state`
|
|
213
251
|
|
|
214
|
-
|
|
252
|
+
Named, indexed interface over `git stash`.
|
|
215
253
|
|
|
216
254
|
```bash
|
|
217
255
|
gitgo state list # show all saved states
|
|
@@ -220,6 +258,7 @@ gitgo state load [id] # restore a state by index
|
|
|
220
258
|
gitgo state delete [id] # delete a state by index
|
|
221
259
|
gitgo state delete -a # delete all saved states
|
|
222
260
|
```
|
|
261
|
+
|
|
223
262
|
*Short aliases:* `-l`, `-s`, `-o`, `-d`
|
|
224
263
|
|
|
225
264
|
### `gitgo user`
|
|
@@ -257,23 +296,17 @@ gitgo -r # verify GitGo is ready
|
|
|
257
296
|
|
|
258
297
|
## How It Works
|
|
259
298
|
|
|
260
|
-
- **SSH Auto-Setup:** `gitgo user login` generates an `ed25519` SSH key
|
|
261
|
-
- **HTTPS to SSH Conversion:** If your remote is set to HTTPS, GitGo
|
|
299
|
+
- **SSH Auto-Setup & Signing:** `gitgo user login` generates an `ed25519` SSH key and prompts you to add it to GitHub twice (for authentication and signing). GitGo then injects temporary `-c` flags into every commit to automatically sign them with this key, without touching your global git config.
|
|
300
|
+
- **HTTPS to SSH Conversion:** If your remote is set to HTTPS and SSH is configured, GitGo rewrites the remote before pushing. No `git remote set-url` required.
|
|
262
301
|
- **Auto-Update Checker:** Spawns a non-blocking background thread on startup to query PyPI for newer versions. Results are cached locally for 7 days to prevent unnecessary network requests.
|
|
263
|
-
- **Termux Compatibility:** Detects Termux via environment variables, adjusts binary locations (`$PREFIX/bin`), uses `termux-open` for browser actions, and
|
|
302
|
+
- **Termux Compatibility:** Detects Termux via environment variables, adjusts binary locations (`$PREFIX/bin`), uses `termux-open` for browser actions, and patches the `detected dubious ownership` Git error.
|
|
264
303
|
- **State Management:** `gitgo state` wraps `git stash` with named saves, indexed listing, and confirmation prompts.
|
|
265
304
|
|
|
266
305
|
---
|
|
267
306
|
|
|
268
307
|
## Contributing
|
|
269
308
|
|
|
270
|
-
Contributions are welcome and
|
|
271
|
-
|
|
272
|
-
1. Fork the Project
|
|
273
|
-
2. Create a Feature Branch (`git checkout -b feature/your-feature`)
|
|
274
|
-
3. Commit Changes
|
|
275
|
-
4. Push to the Branch (`git push origin feature/your-feature`)
|
|
276
|
-
5. Open a Pull Request
|
|
309
|
+
Contributions are welcome. Read [CONTRIBUTING.md](CONTRIBUTING.md) for the full guide, including project structure, test instructions, commit conventions, and a [Good First Issues](CONTRIBUTING.md#good-first-issues) table if you're not sure where to start.
|
|
277
310
|
|
|
278
311
|
---
|
|
279
312
|
|
|
@@ -283,31 +316,15 @@ Contributions are welcome and appreciated!
|
|
|
283
316
|
<table>
|
|
284
317
|
<tr>
|
|
285
318
|
<td align="center"><a href="https://github.com/Huerte"><img src="https://github.com/Huerte.png" width="80px;" alt=""/></a><br /><a href="https://github.com/Huerte"><b>Huerte</b></a><br />Creator</td>
|
|
286
|
-
<td align="center"><a href="https://github.com/Venomous-pie"><img src="https://github.com/Venomous-pie.png" width="80px;" alt=""/></a><br /><a href="https://github.com/Venomous-pie"><b>Venomous-pie</b></a><br />
|
|
319
|
+
<td align="center"><a href="https://github.com/Venomous-pie"><img src="https://github.com/Venomous-pie.png" width="80px;" alt=""/></a><br /><a href="https://github.com/Venomous-pie"><b>Venomous-pie</b></a><br />Contributor</td>
|
|
287
320
|
</tr>
|
|
288
321
|
</table>
|
|
289
322
|
</div>
|
|
290
323
|
|
|
291
324
|
---
|
|
292
325
|
|
|
293
|
-
## Support
|
|
294
|
-
|
|
295
|
-
If GitGo saves you time, consider buying me a coffee. It helps keep the project going.
|
|
296
|
-
|
|
297
|
-
<div align="center">
|
|
298
|
-
<a href="https://ko-fi.com/huerte">
|
|
299
|
-
<img src="https://ko-fi.com/img/githubbutton_sm.svg" alt="Support on Ko-fi" />
|
|
300
|
-
</a>
|
|
301
|
-
</div>
|
|
302
|
-
|
|
303
|
-
---
|
|
304
|
-
|
|
305
326
|
## License
|
|
306
327
|
|
|
307
328
|
Distributed under the **GPLv3** License. See [`LICENSE`](LICENSE) for details.
|
|
308
329
|
|
|
309
|
-
---
|
|
310
|
-
|
|
311
|
-
<div align="center">
|
|
312
|
-
<sub>Created by <a href="https://github.com/Huerte">Huerte</a> with core contributions from <a href="https://github.com/Venomous-pie">Venomous-pie</a></sub>
|
|
313
|
-
</div>
|
|
330
|
+
---
|