Legit adds high-level Git commands for branch switching, sync, publish, and undo. It auto-stashes changes when switching branches and wraps common remote workflows.
Overview
Legit is a complementary command-line interface for Git focused on simpler branch workflows. Commands such as switch, sync, publish, and unpublish wrap sequences of fetch, merge, rebase, push, and stash operations.
Switching branches can automatically stash and restore unstaged work. Sync coordinates stash, fetch, merge or rebase, push, and unstash for published branches. Additional helpers list branches with publication status and undo the latest commit.
Install via pip, Homebrew, or standalone executables. Optional installation registers Git aliases so you can invoke Legit behaviors through git subcommands. Remote operations honor the legit.remote configuration value.
Key features
- Branch switch with auto-stash
- Sync with fetch and push
- Publish and unpublish remotes
- Branch listing with wildcards
- Undo last commit
- Optional git alias install
Use cases
- Feature branch workflows
- Simplified daily Git sync
- Teaching Git to newcomers
- Reducing manual stash steps