Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1.8 KiB
Legit: Git for Humans
Legit is a command-line tool that adds a layer of sanity to everyday Git workflows. It wraps the most common branch operations into simple, memorable commands.
$ uv pip install legit
What It Looks Like
# Install the Git aliases.
$ legit --install
# Sync your current branch: stash, fetch, merge/rebase, push, unstash.
$ git sync
# Publish a branch to the remote.
$ git publish
# Unpublish a branch from the remote.
$ git unpublish
# Undo the last commit (keeps your changes).
$ git undo
# See all branches, nicely formatted.
$ git branches
# main (published)
# feature-x (unpublished)
# fix-login (published)
Each command does one thing and does it safely. git sync handles the entire stash-fetch-merge-push cycle that normally takes four separate commands and a good memory.
The Philosophy
I built Legit in 2011 because I loved the Git workflow in GitHub for Mac and wanted that same clarity on the command line. Git is powerful, but most developers use the same five workflows over and over. Legit packages those workflows into commands that say what they do.
sync synchronizes. publish publishes. undo undoes. No flags to memorize. No arcane incantations. The same "for humans" thinking that shaped Requests, applied to version control.
Many thanks to Frost Ming for maintaining this project.
Install
$ uv pip install legit
Also available via Homebrew:
brew install legit