Giter Site home page Giter Site logo

git-stacked's Introduction

Install

  • go install sgrankin.dev/git-stacked/cmd/git-review@main

Workflow

  • Be working in a branch of master / main
  • Create and tend a series of commits.
  • When ready for review, run git review. PRs are created, one for each commit, dependent on each other.
  • Amend commits as ready. Re-run git review to update all PRs.
  • Merge the first commit.
  • Pull & rebase your branch.
  • git review to update PRs.

Algorithms

git-review

  • Know what the base branch is:
    • Default: the remote's (github) default branch
  • Find commits that are not present in the branch.
  • Update all of the commit messages that do not have a Change-ID: header.
    • Rebase in place, effectively, only modifying the commit message.
  • For each change:
    • Force-push a ref named with the change-id.
    • Create or update the PR onto the base branch (if first commit) or onto previous change.

Other tools

git-stacked's People

Contributors

dependabot[bot] avatar sgrankin avatar

Watchers

 avatar  avatar  avatar

git-stacked's Issues

github client: switch to v4 api

See github.com/shurcooL/githubql

The graphql API is a bit more straightforward to use for queries. Look at swapping over to it.

find and re-open closed PRs when they already exist

When rebasing & reordering patches, the original PR may get automatically closed by github, and git-review will open a new PR, losing review history and approvals.

Instead of opening a new PR, find and re-open any closed PRs that already track a given review branch.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.