https://github.com/sgrankin/git-stacked
Enables a barebones stacked commits flow using GitHub PRs.
https://github.com/sgrankin/git-stacked
git github stacked
Last synced: about 2 months ago
JSON representation
Enables a barebones stacked commits flow using GitHub PRs.
- Host: GitHub
- URL: https://github.com/sgrankin/git-stacked
- Owner: sgrankin
- Created: 2021-07-04T03:09:47.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2023-05-11T20:55:39.000Z (about 3 years ago)
- Last Synced: 2025-03-18T14:50:17.583Z (over 1 year ago)
- Topics: git, github, stacked
- Language: Go
- Homepage:
- Size: 130 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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-absorb` (https://github.com/tummychow/git-absorb) to make amending a series of commits easy.