{"id":38535831,"url":"https://github.com/sspathak/zsh-grob","last_synced_at":"2026-01-17T07:01:40.212Z","repository":{"id":330635172,"uuid":"1123423163","full_name":"sspathak/zsh-grob","owner":"sspathak","description":"Interactive Git tool to make `rebase --onto` painless","archived":false,"fork":false,"pushed_at":"2025-12-26T21:36:03.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-28T11:53:25.497Z","etag":null,"topics":["cli","developer-tools","fzf","git","oh-my-zsh","terminal-ui","zsh","zsh-plugins"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sspathak.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-12-26T20:58:04.000Z","updated_at":"2025-12-26T21:39:46.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/sspathak/zsh-grob","commit_stats":null,"previous_names":["sspathak/zsh-grob"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/sspathak/zsh-grob","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sspathak%2Fzsh-grob","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sspathak%2Fzsh-grob/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sspathak%2Fzsh-grob/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sspathak%2Fzsh-grob/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sspathak","download_url":"https://codeload.github.com/sspathak/zsh-grob/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sspathak%2Fzsh-grob/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28503021,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T06:57:29.758Z","status":"ssl_error","status_checked_at":"2026-01-17T06:56:03.931Z","response_time":85,"last_error":"SSL_read: 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","developer-tools","fzf","git","oh-my-zsh","terminal-ui","zsh","zsh-plugins"],"created_at":"2026-01-17T07:01:39.642Z","updated_at":"2026-01-17T07:01:40.153Z","avatar_url":"https://github.com/sspathak.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# grob - Interactive Git Rebase Tool for Stacked PRs\n\n**Git Rebase Onto Branch (grob)** is an interactive command-line tool that makes `git rebase --onto` intuitive and safe. Available as both a **standalone git subcommand** and a **Zsh plugin**, it uses `fzf` to provide a visual, step-by-step workflow for rebasing commit ranges between branches.\n\n**Perfect for managing stacked pull requests, feature branches, and complex git workflows.**\n\n## 🚀 Why Use grob?\n\n**Git rebase onto** (`git rebase --onto \u003ctarget\u003e \u003cupstream\u003e \u003cbranch\u003e`) is powerful but difficult to visualize and error-prone. **grob simplifies git rebasing** by:\n\n- 🎯 **Visual branch selection** with fuzzy finding\n- 📊 **Live commit previews** showing diffs, stats, and metadata\n- ✅ **Safety checks** preventing rebases with uncommitted changes\n- 🔄 **Perfect for stacked PRs** and feature branch workflows\n- 🚀 **Fast and efficient** - no need to memorize complex `HEAD~N` syntax\n\n## Demo 🎥\n\nhttps://github.com/user-attachments/assets/3ec937d2-7e9b-4ff8-bbb7-7541bbb1e21b\n\n\n### The Killer Use Case: Managing Stacked Pull Requests\n\nIf you work with **stacked pull requests** (Branch B based on Branch A, which is based on `main`), you often face this scenario:\n- Branch A gets updated, amended, or squashed\n- Branch B still references the old version of Branch A\n- You need to move Branch B onto the new Branch A without ghost commits\n\nThis requires `git rebase --onto`, which is complex to construct manually.\n\n**grob makes stacked PR management effortless:**\n1. 🎯 Select the updated Branch A (target)\n2. 📍 Select the first commit unique to Branch B (base)\n3. ✅ Review and confirm the rebase operation\n\nNo more calculating commit hashes or `HEAD~N` references manually!\n\n---\n\n## 🛠 Features\n\n* **🔍 Interactive Branch Selection:** Fuzzy find branches with `fzf` and preview git history\n* **📊 Rich Commit Previews:** View commit messages, authors, dates, file stats, and full diffs\n* **🛡️ Safety First:** Dirty worktree check prevents rebasing with uncommitted changes\n* **🌍 Cross-Platform:** Works on macOS (BSD tools) and Linux (GNU tools)\n* **🎨 Clean Terminal UI:** Formatted summary cards with proper alignment\n* **⚙️ Git Flag Passthrough:** Full support for `git rebase` flags (`-i`, `--autosquash`, `-Xours`, etc.)\n* **📦 Multiple Install Options:** Homebrew, manual install, or Oh-My-Zsh plugin\n* **⚡ Fast Workflow:** No need to look up commit SHAs or calculate `HEAD~N` offsets\n\n---\n\n## 📦 Installation\n\nChoose your preferred installation method:\n\n### Option 1: Homebrew (Recommended for macOS/Linux)\n\nInstall as a **git subcommand** - works seamlessly with your existing git workflow:\n\n```bash\nbrew tap sspathak/tap\nbrew install git-grob\n```\n\nThen invoke with git:\n```bash\ngit grob              # Run the interactive rebase tool\ngit grob -i           # With interactive mode\ngit grob --autosquash # With autosquash enabled\n```\n\n### Option 2: Manual Installation (Any Unix-like System)\n\nInstall the standalone executable:\n\n```bash\n# Download and install\ncurl -o /usr/local/bin/git-grob https://raw.githubusercontent.com/sspathak/zsh-grob/main/git-grob\nchmod +x /usr/local/bin/git-grob\n\n# Use it as a git subcommand\ngit grob\n```\n\n**Requirements:** Zsh must be available at `/usr/bin/env zsh`\n\n### Option 3: Oh-My-Zsh Plugin\n\nInstall as a **Zsh plugin** for a shorter command (`grob` instead of `git grob`):\n\n```bash\n# Clone into Oh-My-Zsh custom plugins\ngit clone https://github.com/sspathak/zsh-grob ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/grob\n```\n\nThen enable in your `~/.zshrc`:\n```zsh\nplugins=(git fzf grob)  # Add 'grob' to your plugins array\n```\n\nReload your shell:\n```bash\nsource ~/.zshrc\n```\n\nNow invoke with the shorter command:\n```bash\ngrob              # Same functionality as 'git grob'\ngrob -i           # With interactive mode\ngrob --autosquash # With autosquash enabled\n```\n\n---\n\n## 📖 Usage\n\n### Basic Usage\n\nRun the interactive rebase tool:\n```bash\ngit grob              # If installed via Homebrew or manual install\ngrob                  # If installed as Oh-My-Zsh plugin\n```\n\n### Advanced Usage with Git Flags\n\nPass any `git rebase` flags to customize behavior:\n```bash\ngit grob -i            # Interactive rebase mode (edit, squash, reword commits)\ngit grob --autosquash  # Auto-squash commits marked with fixup!/squash!\ngit grob -Xours        # Use \"ours\" merge strategy for conflicts\ngit grob -i --autosquash  # Combine multiple flags\n```\n\nAll unrecognized flags are passed directly to the underlying `git rebase --onto` command.\n\n### Interactive Workflow\n\n#### Step 1: Select Target Branch\nUse `fzf` fuzzy finder to select the **destination branch** where commits should land.\n- ⬆️⬇️ Navigate with arrow keys\n- 🔍 Type to filter branches\n- 📜 Preview window shows branch history\n- ↵ Press Enter to select\n\n#### Step 2: Select Base Commit\nSelect the **oldest commit** to move (inclusive selection).\n- All commits from this one to `HEAD` will be rebased\n- Preview shows commit details: author, date, stats, and full diff\n- Color-coded file changes help identify the right commit\n\n#### Step 3: Review and Confirm\nA summary card displays:\n```\n┌─────────────────────────────────────────────┐\n│ Target Branch:  feature-branch-a            │\n│ Commit Count:   5                           │\n│ Starting At:    abc123f                     │\n│ Extra Flags:    -i --autosquash             │\n│ Command:        git rebase --onto ...       │\n└─────────────────────────────────────────────┘\n```\n\n- Press **`y`** to execute the rebase\n- Press **`n`** to abort safely\n\n### Example: Rebasing Stacked PRs\n\n```bash\n# Scenario: Branch B is based on old version of Branch A\n# Branch A has been updated, need to rebase Branch B\n\ngit checkout branch-b\ngit grob\n\n# Step 1: Select 'branch-a' (the updated target)\n# Step 2: Select first commit unique to branch-b\n# Step 3: Review and confirm with 'y'\n\n# Result: branch-b now cleanly based on updated branch-a\n```\n\n## ⚠️ Requirements\n\n- **Zsh** - The script is written in Zsh\n- **fzf** - Required for interactive fuzzy finding ([installation guide](https://github.com/junegunn/fzf#installation))\n- **Git** - Version 1.7.0+ (for `git rebase --onto` support)\n\n## 🤝 Contributing\n\nContributions welcome! This project helps developers manage complex git workflows more easily.\n\n**Repository:** [github.com/sspathak/zsh-grob](https://github.com/sspathak/zsh-grob)\n\n## 📄 License\n\nMIT License\n\n## 🏷️ Keywords\n\ngit rebase tool, interactive git rebase, git rebase onto, stacked pull requests, stacked PRs, git workflow, feature branch management, git subcommand, zsh plugin, fzf git, git automation, rebase helper, git cli tool\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsspathak%2Fzsh-grob","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsspathak%2Fzsh-grob","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsspathak%2Fzsh-grob/lists"}