gs

command module
v0.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 24, 2025 License: GPL-3.0 Imports: 43 Imported by: 0

README

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 and GitLab.
  • 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.

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.

Documentation

Overview

gs (git-spice) is a command line tool for stacking Git branches.

Directories

Path Synopsis
internal
browser
Package browser provides a means of opening a URL in the user's default web browser.
Package browser provides a means of opening a URL in the user's default web browser.
browser/browsertest
Package browsertest provides test helpers for browser support.
Package browsertest provides test helpers for browser support.
cli/shorthand
Package shorthand implements support for shorthand commands for the git-spice CLI.
Package shorthand implements support for shorthand commands for the git-spice CLI.
cmputil
Package cmputil provides utilities for comparing values.
Package cmputil provides utilities for comparing values.
execedit
Package execedit provides the ability to invoke external editors.
Package execedit provides the ability to invoke external editors.
fixturetest
Package fixturetest allows generating values using a possibly-random source on the first run of a test, and stores it in a file for subsequent runs.
Package fixturetest allows generating values using a possibly-random source on the first run of a test, and stores it in a file for subsequent runs.
forge
Package forge provides an abstraction layer between git-spice and the underlying forge (e.g.
Package forge provides an abstraction layer between git-spice and the underlying forge (e.g.
forge/forgetest
Package forgetest is a generated GoMock package.
Package forgetest is a generated GoMock package.
forge/github
Package github provides a wrapper around GitHub's APIs in a manner compliant with the forge.Forge interface.
Package github provides a wrapper around GitHub's APIs in a manner compliant with the forge.Forge interface.
forge/gitlab
Package gitlab provides a wrapper around GitLab's APIs in a manner compliant with the forge.Forge interface.
Package gitlab provides a wrapper around GitLab's APIs in a manner compliant with the forge.Forge interface.
forge/shamhub
Package shamhub implements a fake GitHub-like Forge.
Package shamhub implements a fake GitHub-like Forge.
forge/stacknav
Package stacknav provides support for creating stack navigation comments and descriptions.
Package stacknav provides support for creating stack navigation comments and descriptions.
git
Package git provides access to the Git CLI with a Git library-like interface.
Package git provides access to the Git CLI with a Git library-like interface.
git/gittest
Package gittest provides utilities for testing git repositories.
Package gittest provides utilities for testing git repositories.
graph
Package graph provides general-use graph algorithm implementations.
Package graph provides general-use graph algorithm implementations.
graphqlutil
Package graphqlutil provides utilities for working with GraphQL.
Package graphqlutil provides utilities for working with GraphQL.
httptest
Package httptest provides utilities for HTTP testing.
Package httptest provides utilities for HTTP testing.
logutil
Package logutil provides utilities for logging.
Package logutil provides utilities for logging.
maputil
Package maputil provides utilities for working with maps.
Package maputil provides utilities for working with maps.
mockedit
Package mockedit provides a mock implementation of an editor.
Package mockedit provides a mock implementation of an editor.
must
Package must provides runtime assertions.
Package must provides runtime assertions.
osutil
Package osutil provides utilities for working with the os package.
Package osutil provides utilities for working with the os package.
secret
Package secret provides a layer for storing secretes.
Package secret provides a layer for storing secretes.
secret/secrettest
Package secrettest provides a cross-process testable secret.Stash.
Package secrettest provides a cross-process testable secret.Stash.
sliceutil
Package sliceutil contains utility functions for working with slices.
Package sliceutil contains utility functions for working with slices.
spice
Package spice intends to provide the core functionality of the tool.
Package spice intends to provide the core functionality of the tool.
spice/state
Package state defines and sores the state for gs.
Package state defines and sores the state for gs.
spice/state/storage
Package storage provides a key-value storage abstraction where values are JSON-serializable structs.
Package storage provides a key-value storage abstraction where values are JSON-serializable structs.
termtest
Package termtest provides utilities for testing terminal-based programs.
Package termtest provides utilities for testing terminal-based programs.
text
Package text provides text manipulation functions.
Package text provides text manipulation functions.
ui
Package ui provides terminal widgets for git-spice.
Package ui provides terminal widgets for git-spice.
ui/fliptree
Package fliptree renders a tree of nodes as text in reverse: children first, then parent.
Package fliptree renders a tree of nodes as text in reverse: children first, then parent.
ui/uitest
Package uitest provides means of testing UI interactions.
Package uitest provides means of testing UI interactions.
ui/widget
Package widget implements more complex user interface components on top of the primitives offered in the ui package.
Package widget implements more complex user interface components on top of the primitives offered in the ui package.
tools
ci/install-git
install-git downloads and installs a specific version of Git to the given prefix.
install-git downloads and installs a specific version of Git to the given prefix.
ci/prepare-release
prepare-releases prepares a release of git-spice for CI.
prepare-releases prepares a release of git-spice for CI.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL