{"id":47718067,"url":"https://github.com/israelmalagutti/git-stack","last_synced_at":"2026-04-24T22:03:15.508Z","repository":{"id":334071293,"uuid":"1134548111","full_name":"israelmalagutti/git-stack","owner":"israelmalagutti","description":"Simple, fast git stack wrapper","archived":false,"fork":false,"pushed_at":"2026-04-02T19:46:09.000Z","size":565,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-03T05:08:24.257Z","etag":null,"topics":["cli","developer-tools","git","go","stacked-diffs"],"latest_commit_sha":null,"homepage":"https://gs.israelmalagutti.workers.dev","language":"Go","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/israelmalagutti.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-01-14T21:42:09.000Z","updated_at":"2026-04-02T16:21:38.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/israelmalagutti/git-stack","commit_stats":null,"previous_names":["israelmalagutti/git-wrapper","israelmalagutti/git-stack"],"tags_count":22,"template":false,"template_full_name":null,"purl":"pkg:github/israelmalagutti/git-stack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/israelmalagutti%2Fgit-stack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/israelmalagutti%2Fgit-stack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/israelmalagutti%2Fgit-stack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/israelmalagutti%2Fgit-stack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/israelmalagutti","download_url":"https://codeload.github.com/israelmalagutti/git-stack/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/israelmalagutti%2Fgit-stack/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32240613,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T13:21:15.438Z","status":"ssl_error","status_checked_at":"2026-04-24T13:21:15.005Z","response_time":64,"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","git","go","stacked-diffs"],"created_at":"2026-04-02T19:08:12.461Z","updated_at":"2026-04-24T22:03:15.474Z","avatar_url":"https://github.com/israelmalagutti.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gs - Git Stack\n\nA fast, simple git stack management CLI tool for working with stacked diffs (stacked PRs).\n\n## Features\n\n- **Stack Management** - Create and manage parent-child relationships between branches\n- **Smart Navigation** - Move up/down the stack, jump to top/bottom\n- **Rebase Operations** - Automatic restacking when parent branches change\n- **Interactive UI** - Prompts for branch selection, conflict resolution guidance\n- **Platform Agnostic** - Works with any git hosting (GitHub, GitLab, etc.)\n- **Metadata Sync** - Stack structure stored in git refs, shareable across developers and machines via push/fetch\n- **MCP Server** - AI agent integration via Model Context Protocol (`gs mcp`)\n\n## Installation\n\n### npx (no install needed)\n\n```bash\nnpx @gitstack/cli\n```\n\n### Homebrew (macOS / Linux)\n\n```bash\nbrew install israelmalagutti/tap/git-stack\n```\n\n### Go\n\n```bash\ngo install github.com/israelmalagutti/git-stack@latest\n```\n\n### Shell script\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/israelmalagutti/git-stack/main/scripts/install.sh | bash\n```\n\n### From source\n\n```bash\ngit clone https://github.com/israelmalagutti/git-stack.git\ncd git-stack\nmake install\n```\n\n### MCP for Claude Code (zero-install)\n\n```bash\nclaude mcp add gs -- npx @gitstack/cli mcp\n```\n\n## Quick Start\n\n```bash\n# Initialize gs in your repository\ngs init\n\n# Create a new stacked branch\ngs create feat-auth\n\n# Make changes and commit\ngit add . \u0026\u0026 git commit -m \"Add authentication\"\n\n# Create another branch on top\ngs create feat-auth-ui\n\n# View the stack\ngs log\n\n# Navigate the stack\ngs up          # Move to child branch\ngs down        # Move to parent branch\ngs top         # Jump to top of stack\ngs bottom      # Jump to trunk\n\n# Restack after parent changes\ngs stack restack\n```\n\n## Commands\n\n### Core Commands\n\n| Command | Alias | Description |\n|---------|-------|-------------|\n| `gs init` | | Initialize gs in a repository |\n| `gs create \u003cname\u003e` | | Create a new stacked branch |\n| `gs track [branch]` | | Track an existing branch |\n| `gs checkout \u003cbranch\u003e` | `co`, `switch` | Switch to a branch |\n| `gs log` | | Visualize the stack structure |\n| `gs info` | | Show current branch details |\n\n### Navigation\n\n| Command | Alias | Description |\n|---------|-------|-------------|\n| `gs up [n]` | `u` | Move up toward leaves |\n| `gs down [n]` | `dn` | Move down toward trunk |\n| `gs top` | `t` | Jump to top of stack |\n| `gs bottom` | `b` | Jump to trunk |\n| `gs parent` | | Show parent branch |\n| `gs children` | | Show child branches |\n\n### Stack Operations\n\n| Command | Alias | Description |\n|---------|-------|-------------|\n| `gs stack restack` | | Rebase stack to maintain relationships |\n| `gs modify` | `m` | Amend commit and restack children |\n| `gs move [target]` | `mv` | Move branch to different parent |\n| `gs fold` | | Fold current branch into parent |\n| `gs delete [branch]` | `rm` | Delete branch from stack |\n| `gs split` | | Split branch into multiple branches |\n| `gs rename \u003cname\u003e` | | Rename the current branch |\n| `gs sync` | | Fetch remote, clean stale branches, delete merged, and restack |\n| `gs mcp` | | Start the MCP server for AI agent integration |\n\n### Split Modes\n\n```bash\ngs split -c              # Split by selecting commits\ngs split -u              # Interactive hunk selection\ngs split -f \"*.json\"     # Split files matching pattern\ngs split -n base         # Specify new branch name\n```\n\n## Development\n\n### Prerequisites\n\n- Go 1.21+\n- Make\n\n### Building\n\n```bash\n# Build for current platform\nmake build\n\n# GoReleaser snapshot (all platforms, no publish)\nmake release-dry-run\n```\n\n### Makefile Targets\n\n| Target | Description |\n|--------|-------------|\n| `make build` | Build binary with version injection |\n| `make install` | Build and install to /usr/local/bin |\n| `make uninstall` | Remove from /usr/local/bin |\n| `make release-dry-run` | GoReleaser snapshot (all platforms, no publish) |\n| `make clean` | Remove build artifacts |\n| `make test` | Run tests |\n| `make test-coverage` | Run tests with HTML coverage report |\n| `make lint` | Run golangci-lint |\n| `make version` | Show version info |\n\n### Versioning\n\nVersion is injected at build time from git tags:\n\n```bash\n# Shows commit hash if no tag\ngs --version\n# gs version a1b2c3d\n\n# After tagging\ngit tag v0.1.0\nmake build\ngs --version\n# gs version v0.1.0\n```\n\n### Creating a Release\n\n1. Update `CHANGELOG.md`\n2. Commit changes\n3. Create and push a tag:\n   ```bash\n   git tag v0.1.0\n   git push origin v0.1.0\n   ```\n4. GitHub Actions will automatically build and publish the release\n\n## MCP Server\n\n`gs mcp` starts a [Model Context Protocol](https://modelcontextprotocol.io) server over stdio, letting AI agents (Claude Code, Cursor, VS Code Copilot, etc.) manage stacks programmatically. See [docs/mcp.md](docs/mcp.md) for the full tool reference and architecture.\n\n## Configuration\n\ngs stores metadata in two locations (dual-write):\n\n- **Git refs** (`refs/gs/meta/*`, `refs/gs/config`) — shareable via `git push`/`fetch`, syncs stack structure across developers and machines\n- **Local JSON** (`.git/.gs_stack_metadata`) — fallback for offline/legacy use\n\nOn read, refs are tried first with automatic fallback to JSON. See [docs/branch-metadata-sync.md](docs/branch-metadata-sync.md) for the full design.\n\n## License\n\nMIT\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fisraelmalagutti%2Fgit-stack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fisraelmalagutti%2Fgit-stack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fisraelmalagutti%2Fgit-stack/lists"}