| Stacked Git (StGit) [1] is a git CLI add-on for working with stacked commits in your local repo. Why are stacked commits useful? Multiple patches can be developed concurrently and efficiently, with each patch focused on a single concern, for a clean Git commit history and improved productivity. The tutorial [2] says: > One common use of StGit is to “polish” a Git branch before publishing it to another public repository. The kinds of polish that StGit can help with include: Complete and correct commit messages.
Each patch limited to one coherent topic.
Each patch standing on its own: passing tests, etc.
Considerate patch (commit) order
> Careful curation of Git commit history, as enabled by StGit, can be of high value to those reviewing pull requests or trying to understand why or how code came to be the way it is. ...> As a concrete example, consider a situation where several Git commits have been made in a repository with commit messages such as: “Improve the snarfle cache”
“Remove debug printout”
“New snarfle cache test”
“Oops, spell function name correctly”
“Fix documentation error”
“More snarfle cache”
> While the above may be the “true” history of commits to the repository, it may not be the history that is most helpful to code reviewers or the developer who needs to understand what happened in this area of the code six months after the fact. Using StGit, this history can be revised to be higher quality and higher value.Originally written in Python (2005, pre-GitHub) by Catalin Marinas, the current version is in Rust. StGit is free and open source [3]. It was inspired by Quilt [4], an earlier system credited to Andrew Morton and Andreas Grünbacher. [1] https://stacked-git.github.io/
[2] https://stacked-git.github.io/guides/tutorial/#development-b...
[3] https://github.com/stacked-git/stgit/
[4] https://en.wikipedia.org/wiki/Quilt_(software) |