GitGo CLI - Your Fast Git Companion. Simplifies git push, link, stash, and user management.
Project description
Stop typing the same five Git commands. Run one instead.
If GitGo saves you time, consider buying me a coffee. It helps keep the project going.
GitGo wraps your most repetitive git commands into short ones you can actually remember. It covers init, add, commit, push, branch, and stash. It also handles the things most tools skip like automatic SSH setup, HTTPS to SSH conversion, and a simple stash interface called state management.
# Instead of this:
git init && git add . && git commit -m "init" && git remote add origin <url> && git push -u origin main
# Run this:
gitgo link https://github.com/username/repo.git "init"
Table of Contents
- Demo
- Features
- Installation Guide
- Usage
- Command Reference
- How It Works
- Contributing
- Credits
- License
- Changelog
- Contributing Guide
Demo
Features
GitGo provides a CLI environment designed for faster and simpler Git workflows. No chained commands, no cryptic flags — just short commands you can actually remember.
- Simplified Git Operations: Replaces chained commands with single commands for linking, pushing, and stashing.
- Undo Operations: Safely undo commits, un-queue files, or wipe local changes without any complex Git jargon.
- Safe Branch Switching: Safely traverse branches with
jump. Auto-stashes messy code and prevents merge conflict disasters with a Try-And-Revert safety engine. - State Management: A human-readable interface over
git stash. States are named and listed by index so you never have to remember cryptic stash references. - Custom Defaults: Save your preferred branch name and commit message locally so you never have to type them again.
- Auto-Update Checker: Silently checks for newer versions in the background and notifies you, without slowing down your commands.
- SSH Auto-Setup: Generates an SSH key, adds it to
ssh-agent, and opens your GitHub settings automatically. - HTTPS to SSH Conversion: Silently converts the remote to SSH before pushing if your SSH is configured.
- Termux Compatibility: Works on Android via Termux, handling common issues like dubious ownership errors out of the box.
Installation Guide
Prerequisites
- Python 3.8+
- Git 2.x+: git-scm.com
- OpenSSH: required for
gitgo user login(pre-installed on most systems) - A GitHub account
Install from PyPI
For Windows users or environments without global pip restrictions, you can install GitGo directly via pip:
pip install pygitgo
(Alternatively, you can use pipx install pygitgo if you prefer isolated environments).
Install via pipx (Cross-Platform)
If you already have pipx installed, you can use it to safely install GitGo on any operating system:
pipx install pygitgo
Quick Install (Linux & macOS)
The easiest way to install GitGo on Unix systems without worrying about Python environments or PEP 668 restrictions is using our install script:
curl -sSL https://raw.githubusercontent.com/Huerte/GitGo/main/install.sh | bash
This will automatically create an isolated environment and place gitgo in your ~/.local/bin folder.
Verify the installation:
gitgo -r
Note for Termux (Android): GitGo detects the Termux environment automatically and adjusts install paths and browser behavior accordingly.
Install from Source
git clone https://github.com/Huerte/GitGo.git
cd GitGo
pip install -e .
Usage
1. Set Up Your Identity
On first use, run the login wizard. GitGo generates an SSH key, prints the public key, and opens your GitHub SSH settings page automatically.
gitgo user login
2. Link a New Project to GitHub
Point GitGo at an existing empty GitHub repository. It will initialize Git, stage everything, make the first commit, and push — handling branch naming and merge conflicts automatically.
gitgo link https://github.com/username/repo.git "Initial commit"
3. Push Changes
# Push to an existing branch
gitgo push main "Fix auth bug"
# Create a new branch and push
gitgo push -n feat/login "Add login flow"
4. Safely Switch Branches
Jump to a different branch without worrying about your uncommitted changes. GitGo will safely stash them, hop to the new branch, sync with main, and carefully unpack them.
gitgo jump feat/new-login
5. Safely Undo Mistakes
Easily fix common mistakes without losing work or needing to search for Git commands.
gitgo undo commit # Undo the last commit (files stay safe)
gitgo undo add # Un-queue files (undo git add)
gitgo undo changes # DANGER: permanently wipe all unsaved edits
6. Save Your Work-in-Progress
gitgo state save "halfway through refactor"
gitgo state list
gitgo state load 1
6. Custom Defaults
Save your preferred settings so you don't have to provide them every time.
gitgo config set default-branch develop
gitgo config set default-message "WIP: updates"
gitgo config get default-branch
Command Reference
gitgo push
Stages all changes, commits, and pushes in one command.
gitgo push [branch] [message]
gitgo push -n [branch] [message] # create new branch first
gitgo push -s [branch] [message] # interactively select files to stage
[!TIP] Use
gitgo push -hto see all available flags and examples.
| Flag | Description |
|---|---|
-n, --new |
Create a new branch before pushing |
-s, --select |
Interactively select which files you want to include in this push |
If there are no new changes but unpushed commits exist, GitGo detects this and pushes without creating an empty commit.
gitgo pull
Safely downloads updates from the remote server. It automatically stashes your messy code, pulls the updates cleanly underneath using a rebase, and then instantly puts your code back exactly how it was.
gitgo pull # Safely pull updates for your current branch
gitgo pull <branch> # Safely pull updates from a specific branch
gitgo link
Initializes a Git repository in the current directory, connects it to a remote, and pushes. Handles already-initialized repos gracefully and pulls unrelated histories.
gitgo link <github_repo_url> [commit_message]
gitgo jump
Safely switches branches without losing uncommitted progress. Auto-stashes, jumps, pulls from main, and unpacks. If applying the stash triggers a merge conflict, the built-in Try-and-Revert engine will offer to safely cancel the entire operation and instantly rewind your repository to exactly how it was before the command.
gitgo jump <branch>
gitgo undo
Safely undo recent actions and mistakes using plain commands that say exactly what they do.
gitgo undo commit # Undo your last commit without losing files
gitgo undo add # Un-queue files (remove them from being ready to commit)
gitgo undo changes # Permanently wipe all new files and local edits
gitgo state
A named interface over git stash.
gitgo state list # show all saved states
gitgo state save [name] # save current work (default name: Auto-Save)
gitgo state load [id] # restore a state by index
gitgo state delete [id] # delete a state by index
gitgo state delete -a # delete all saved states
Short aliases: -l, -s, -o, -d
gitgo user
gitgo user # show current Git identity
gitgo user login # generate SSH key and configure Git identity
gitgo user logout # remove SSH keys and Git identity config
gitgo config
Manage your GitGo defaults.
gitgo config set <key> <value>
gitgo config get <key>
| Key | Description | Default |
|---|---|---|
default-branch |
The branch used for push/link | main |
default-message |
The commit message used for push | New Project Update |
Global Flags
gitgo help # show complete manual
gitgo <cmd> -h # show help for a specific command
gitgo -v # version
gitgo -r # verify GitGo is ready
How It Works
- SSH Auto-Setup:
gitgo user logingenerates aned25519SSH key, adds it tossh-agent, prints the public key, and opensgithub.com/settings/ssh/new. - HTTPS to SSH Conversion: If your remote is set to HTTPS, GitGo converts the remote to SSH before pushing if SSH is configured. No
git remote set-urlis required. - 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.
- Termux Compatibility: Detects Termux via environment variables, adjusts binary locations (
$PREFIX/bin), usestermux-openfor browser actions, and natively handles thedetected dubious ownershipGit error. - State Management:
gitgo statewrapsgit stashwith named saves, indexed listing, and confirmation prompts.
Contributing
Contributions are welcome. Read CONTRIBUTING.md for the full guide, including project structure, test instructions, commit conventions, and a Good First Issues table if you are not sure where to start.
Credits
Huerte Creator |
Venomous-pie Core Contributor |
License
Distributed under the GPLv3 License. See LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pygitgo-1.6.2.tar.gz.
File metadata
- Download URL: pygitgo-1.6.2.tar.gz
- Upload date:
- Size: 46.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
198aee0baee4ab34e4475787738bd88fa109a5bcdfbeede8a61c14b9a3eadb96
|
|
| MD5 |
13798b1c37c009bb5122dcc95bde8686
|
|
| BLAKE2b-256 |
b55e19f74bc641ee74ea870a59afb5f03bfb3da8646d1296a643441c116770d4
|
Provenance
The following attestation bundles were made for pygitgo-1.6.2.tar.gz:
Publisher:
release.yml on Huerte/GitGo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pygitgo-1.6.2.tar.gz -
Subject digest:
198aee0baee4ab34e4475787738bd88fa109a5bcdfbeede8a61c14b9a3eadb96 - Sigstore transparency entry: 1666910508
- Sigstore integration time:
-
Permalink:
Huerte/GitGo@ce2e3c3c55ef444bd5879866872d062b523466e7 -
Branch / Tag:
refs/tags/v1.6.2 - Owner: https://github.com/Huerte
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ce2e3c3c55ef444bd5879866872d062b523466e7 -
Trigger Event:
release
-
Statement type:
File details
Details for the file pygitgo-1.6.2-py3-none-any.whl.
File metadata
- Download URL: pygitgo-1.6.2-py3-none-any.whl
- Upload date:
- Size: 39.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2c297725a92202bc4a343a12da70c07f5d5365de124691b093634b7c0beae9c6
|
|
| MD5 |
14a765ad722a54c9bc828b737fe51c55
|
|
| BLAKE2b-256 |
06c985700b6a33407af74dbb039c4852ba824ac2c86e18a36b1b636339338283
|
Provenance
The following attestation bundles were made for pygitgo-1.6.2-py3-none-any.whl:
Publisher:
release.yml on Huerte/GitGo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pygitgo-1.6.2-py3-none-any.whl -
Subject digest:
2c297725a92202bc4a343a12da70c07f5d5365de124691b093634b7c0beae9c6 - Sigstore transparency entry: 1666910778
- Sigstore integration time:
-
Permalink:
Huerte/GitGo@ce2e3c3c55ef444bd5879866872d062b523466e7 -
Branch / Tag:
refs/tags/v1.6.2 - Owner: https://github.com/Huerte
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ce2e3c3c55ef444bd5879866872d062b523466e7 -
Trigger Event:
release
-
Statement type: