git-autofixup
git-instafix
Our great sponsors
git-autofixup | git-instafix | |
---|---|---|
3 | 1 | |
164 | 22 | |
- | - | |
7.9 | 7.5 | |
4 months ago | 12 days ago | |
Perl | Rust | |
GNU General Public License v3.0 or later | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
git-autofixup
- Git-autofixup: create fixup commits for topic branches
-
Stacked Git – manage commits as a stack of patches
Somewhat (or possibly greatly) related:
Are tools like git-absorb safe/reliable?
"Essentially, when your working directory has uncommitted changes on top of draft changesets, you can run `hg absorb` and the uncommitted modifications are automagically folded ("absorbed") into the appropriate draft ancestor changesets. This is essentially doing `hg histedit` + "roll" actions without having to make a commit or manually make history modification rules."
I haven't wrapped my head around the algorithm. I get that an algorithm can "recollate" a series of commits in a way that yields no commit conflicts, but that's not the same as rearranging and combining commits into a sequence of semantically coherent atomic commits.
---
https://github.com/tummychow/git-absorb
https://github.com/torbiak/git-autofixup
-
Correct Git commits with Git-autofixup
git-autofixup can also be installed by simply downloading the script[1], giving it execute permissions, and putting it somewhere in your PATH. It needs perl 5.8.4+, which is very old, and only depends on the standard library. Git ships with a Perl interpreter on Windows.
If there are any staged changes, git-autofixup only fixes those up and ignores any unstaged ones; otherwise it tries to autofixup all unstaged changes.
[1]: https://github.com/torbiak/git-autofixup/blob/master/git-aut...
git-instafix
-
Correct Git commits with Git-autofixup
If you start doing a commit (via `c` in the magit status buffer, with the standard semantics of "you're going to commit everything that's currently staged") you can press capital F for an instant fixup, or capital S for instant squash.
When you press either of those, magit pops up a commit picker which shows the current git log. Selecting a commit will then instantaneously apply your staged changes to the selected commit. It's much simpler than any of the other workflows I've seen in response to your question.
The gif in this repo (for a tool I made that simulates this behavior as a cli tool for some jealous coworkers) tries to show the workflow: https://github.com/quodlibetor/git-fixup
What are some alternatives?
git-absorb - git commit --fixup, but automatic
vim-fugitive - fugitive.vim: A Git wrapper so awesome, it should be illegal
magit - It's Magit! A Git Porcelain inside Emacs.
misc-gitology - An assortment of scripts around Git
GUIDeFATE - GUI Design From A Text Editor
scripts - Useful scripts that I find handy to work with
stgit - Stacked Git
PerlDistSite-Template - Template for a PerlDistSite Instance