Abhinav Gupta a21a7c5f2a
autofix.ci / autofix (push) Waiting to run
CI / Lint (push) Waiting to run
CI / Generate test matrix (push) Waiting to run
CI / Test / ${{ matrix.name }} (push) Blocked by required conditions
CI / OK (push) Blocked by required conditions
GitHub Pages / build (push) Waiting to run
GitHub Pages / deploy (push) Blocked by required conditions
feat(forge): Add configurable forge kind (#1219)
Some Git remotes use host aliases that are valid for Git transport but
do
not identify the forge to git-spice. Add the hidden `spice.forge.kind`
configuration option and `GIT_SPICE_FORGE_KIND` environment variable so
users
can select a registered forge without changing their remote URL.

Remote resolution now uses the configured remote URL before Git
transport
rewriting for forge detection, while Git operations still use normal Git
transport behavior. Submit, sync, auth selection, and list/log paths
share
the same resolver boundary.

Document the setup flow for aliased SSH remotes and cover the config and
environment paths with unit and script tests.

Resolves #336, #603
2026-05-31 20:17:56 -07:00
2026-05-31 18:37:52 +00:00

git-spice

Introduction

CI codecov

git-spice is a tool for stacking Git branches. It lets you manage and navigate stacks of branches, conveniently modify and rebase them, and create GitHub Pull Requests or GitLab Merge Requests from them.

See https://abhinav.github.io/git-spice/ for more details.

Usage looks roughly like this:

# Stack a branch on top of the current branch.
$ gs branch create feat1

# Stack another branch on top of feat1.
$ gs branch create feat2

# Submit pull requests for feat1 and feat2.
$ gs stack submit

# Pull latest changes from the remote repository
# and delete merged branches.
$ gs repo sync

# Restack branches on top of the latest changes.
$ gs stack restack

Or equivalently, using CLI shorthands:

$ gs bc feat1  # branch create feat1
$ gs bc feat2  # branch create feat2
$ gs ss        # stack submit
$ gs rs        # repo sync
$ gs sr        # stack restack

Features

  • Create, edit, and navigate stacks of branches with ease.
  • Submit the entire stack or parts of it with a single command. Supports GitHub, GitLab, and BitBucket.
  • Keep using your existing workflow and adopt git-spice incrementally.
  • Completely offline operation with no external dependencies until you push or pull from a remote repository.
  • Easy-to-remember shorthands for most commands.

Documentation

See https://abhinav.github.io/git-spice/ for the full documentation.

Sponsors

User avatar: Bugen ZhaoUser avatar: IsmarUser avatar: Manu SridharanUser avatar: Private Sponsor

License

This software is distributed under the GPL-3.0 License:

git-spice: Stacked Pull Requests
Copyright (C) 2024 Abhinav Gupta

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.

See LICENSE for details.

S
Description
No description provided
Readme GPL-3.0 22 MiB
Languages
Go 99.4%
Shell 0.6%