{"id":41126843,"url":"https://github.com/melonamin/gt","last_synced_at":"2026-01-22T18:09:51.685Z","repository":{"id":312285753,"uuid":"1046975238","full_name":"melonamin/gt","owner":"melonamin","description":"Makes Git worktrees actually pleasant to use.","archived":false,"fork":false,"pushed_at":"2026-01-14T19:49:46.000Z","size":5346,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-14T23:37:23.499Z","etag":null,"topics":["cli","git","tui"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/melonamin.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-29T14:30:13.000Z","updated_at":"2026-01-14T19:49:31.000Z","dependencies_parsed_at":"2025-08-29T17:22:35.385Z","dependency_job_id":"3afb1e0e-6508-442f-bace-f8c5616a45d5","html_url":"https://github.com/melonamin/gt","commit_stats":null,"previous_names":["melonamin/gt"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/melonamin/gt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melonamin%2Fgt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melonamin%2Fgt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melonamin%2Fgt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melonamin%2Fgt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/melonamin","download_url":"https://codeload.github.com/melonamin/gt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melonamin%2Fgt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28667881,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T17:07:18.858Z","status":"ssl_error","status_checked_at":"2026-01-22T17:05:02.040Z","response_time":144,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","git","tui"],"created_at":"2026-01-22T18:09:50.542Z","updated_at":"2026-01-22T18:09:51.674Z","avatar_url":"https://github.com/melonamin.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\u003cimg width=\"384\" height=\"256\" alt=\"gt-banner\" src=\"https://github.com/user-attachments/assets/4c7f4243-f432-4d3b-bc86-16e3f11c1528\" /\u003e\n\u003c/div\u003e\n\n# gt - Git Worktree Manager\n\n\u003e A blazing fast TUI for managing Git worktrees with zero friction\n\nEver find yourself juggling multiple feature branches, hotfixes, and experiments? Constantly stashing, switching branches, and losing context?\n\n**gt** makes Git worktrees as easy as breathing.\n\n## What it does\n\nInstantly manage all your Git worktrees with:\n- **Interactive TUI** - See all worktrees at a glance\n- **Instant creation** - `gt feature-x` creates and switches in one command\n- **Smart organization** - Keeps worktrees in `.worktrees/` (auto-added to `.git/info/exclude`)\n- **Zero config** - Single binary, works out of the box\n\n## Installation\n\n### Homebrew (macOS)\n\n```bash\nbrew tap melonamin/formulae\nbrew install gt\n```\n\n### Download Pre-built Binaries\n\nDownload the latest release from [GitHub Releases](https://github.com/melonamin/gt/releases):\n\n#### macOS (Universal)\n```bash\ncurl -L https://github.com/melonamin/gt/releases/latest/download/gt-macos-universal.zip -o gt.zip\nunzip gt.zip\nchmod +x gt-macos-universal\nsudo mv gt-macos-universal /usr/local/bin/gt\n```\n\n#### Linux (amd64)\n```bash\ncurl -L https://github.com/melonamin/gt/releases/latest/download/gt-linux-amd64.tar.gz | tar xz\nchmod +x gt-linux-amd64\nsudo mv gt-linux-amd64 /usr/local/bin/gt\n```\n\n#### Linux (arm64)\n```bash\ncurl -L https://github.com/melonamin/gt/releases/latest/download/gt-linux-arm64.tar.gz | tar xz\nchmod +x gt-linux-arm64\nsudo mv gt-linux-arm64 /usr/local/bin/gt\n```\n\n### Using Go\n```bash\ngo install github.com/melonamin/gt@latest\n```\n\n### Build from Source\n```bash\ngit clone https://github.com/melonamin/gt.git\ncd gt\ngo build -o ~/.local/bin/gt\n```\n\n## The Problem\n\nYou're working on a feature. Urgent bug comes in. You stash everything, switch branches, fix the bug, switch back, pop stash, resolve conflicts... 😤\n\nOr worse: you have `repo`, `repo-backup`, `repo-new`, `repo-actually-working` scattered across your filesystem.\n\n## The Solution\n\nEach branch gets its own working directory. Switch instantly, no stashing:\n\n```bash\n$ gt\n→ main               ✓  Initial commit (2 hours ago)\n  feature-auth       ●  Add OAuth implementation (3 days ago)\n  fix-memory-leak    ✓  Fix connection pooling (1 week ago)\n\n[n]ew  [d]elete  [enter] switch  [/] search  [q]uit\n```\n\n## Quick Start\n\n```bash\n# In any git repository\ngt                    # Open interactive worktree manager\ngt feature-xyz        # Create worktree 'feature-xyz' from current branch and switch\ngt fix-bug main       # Create worktree 'fix-bug' from 'main' branch and switch\n```\n\nThat's it. No configuration needed.\n\n## Features\n\n### ⚡ Instant Worktree Creation\n```bash\ngt my-feature\n```\nCreates a new worktree from your current branch and switches to it immediately. Your original working directory stays untouched.\n\n### 🎯 Interactive Management\n```bash\ngt\n```\nOpens a beautiful TUI showing all your worktrees with:\n- Branch names and current status\n- Last commit message and time\n- Dirty state indicators (●)\n- Current worktree highlighting\n\n### 🔍 Smart Search\nPress `/` in the TUI to fuzzy search through:\n- Branch names\n- Commit messages\n- Worktree paths\n\n### 🗂️ Automatic Organization\nWorktrees are stored in `.worktrees/` within your repo:\n```\nmy-project/\n├── .git/\n├── .worktrees/       # All worktrees here (auto-added to .git/info/exclude)\n│   ├── feature-auth/\n│   ├── fix-bug/\n│   └── experiment/\n└── ... your files\n```\n\n### 🎨 Visual Status\n- `●` Current worktree (where you are now)\n- `●` Dirty (uncommitted changes)\n- `✓` Clean\n- Time-aware display (2 hours ago, 3 days ago, etc.)\n\n## Usage\n\n### Command Line\n```bash\ngt                           # Open interactive worktree manager\ngt \u003cname\u003e                    # Create worktree from current branch and switch\ngt \u003cname\u003e \u003cbranch\u003e           # Create worktree from specified branch and switch\ngt -h, --help                # Show help\n```\n\n### Interactive Mode (TUI)\n\n| Key | Action |\n|-----|--------|\n| `↑/↓` or `j/k` | Navigate list |\n| `Enter` | Switch to selected worktree |\n| `n` | Create new worktree |\n| `d` | Delete selected worktree |\n| `/` | Search/filter worktrees |\n| `r` | Refresh list |\n| `q` or `Ctrl+C` | Quit |\n\n### Examples\n\n```bash\n# Working on a feature, need to fix a bug\ngt hotfix-memory-leak main    # Creates worktree from main, switches there\n\n# After fixing, go back\ngt                            # Open TUI, select your feature, press Enter\n\n# Start a new feature\ngt new-oauth-flow             # Creates from current branch\n\n# Experiment without affecting anything\ngt experiment-redis-cache develop\n```\n\n## Configuration\n\nConfiguration file: `~/.config/gt/config.json`\n\n```json\n{\n  \"worktree_dir\": \".worktrees\",  // Where to store worktrees (relative or absolute)\n  \"shell\": \"fish\"                 // Override shell (default: $SHELL)\n}\n```\n\n### Environment Variables\n\nThe shell used when switching worktrees:\n1. Config file `shell` setting (if set)\n2. `$SHELL` environment variable\n3. Fallback to `/bin/bash`\n\n## How It Works\n\nGit worktrees let you have multiple working directories for the same repository. Instead of stashing/switching branches, you just switch directories. Each worktree has:\n- Its own working directory\n- Its own index (staging area)\n- Its own HEAD (current branch)\n- Shared repository data (.git)\n\n`gt` makes worktrees frictionless by:\n1. Organizing them in one place\n2. Providing instant creation/switching\n3. Showing status at a glance\n4. Auto-managing `.git/info/exclude`\n\n## Comparison with Alternatives\n\n| Feature | `git worktree` | `git stash` | **gt** |\n|---------|---------------|-------------|--------|\n| **Switch Speed** | Manual `cd` | Slow (stash/pop) | Instant |\n| **Context Preservation** | ✅ Full | ❌ Lost | ✅ Full |\n| **Discoverability** | `git worktree list` | `git stash list` | Visual TUI |\n| **Creation** | Multi-step | N/A | One command |\n| **Organization** | DIY | N/A | Automatic |\n| **Learning Curve** | Medium | Low | Zero |\n\n## FAQ\n\n**Q: How is this different from just using `git worktree`?**\nA: `gt` is to `git worktree` what `tig` is to `git log`. It makes the powerful feature actually pleasant to use.\n\n**Q: Where are my worktrees stored?**\nA: By default in `.worktrees/` within your repo. This is configurable and automatically added to `.git/info/exclude`.\n\n**Q: Can I use my existing worktrees?**\nA: Yes! `gt` shows all worktrees, regardless of where they were created.\n\n**Q: What happens to the worktree when I delete a branch?**\nA: The worktree remains but becomes detached. You can delete it with `gt` (press `d` in the TUI).\n\n**Q: Does this work with bare repositories?**\nA: Yes, it works with any Git repository structure.\n\n## Philosophy\n\nWorktrees are Git's best-kept secret. They solve the context-switching problem elegantly, but the CLI is clunky. `gt` makes them feel native.\n\nNo more:\n- Lost stashes\n- Conflicted merges after stash pop\n- Uncommitted changes blocking branch switches\n- Mental overhead of context switching\n\nJust instant, clean switches between parallel workstreams.\n\n## Contributing\n\nThe entire tool is a single Go file using the excellent [Bubble Tea](https://github.com/charmbracelet/bubbletea) TUI framework. PRs welcome!\n\n## License\n\nMIT - Do whatever you want with it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmelonamin%2Fgt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmelonamin%2Fgt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmelonamin%2Fgt/lists"}