git-autofixup
scripts
Our great sponsors
git-autofixup | scripts | |
---|---|---|
3 | 2 | |
164 | 3 | |
- | - | |
7.9 | 0.0 | |
4 months ago | about 2 years ago | |
Perl | Shell | |
GNU General Public License v3.0 or later | MIT License |
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...
scripts
-
How to do things safely in Bash
If you’re interested in writing safe shell scripts then check out shellcheck:
https://github.com/koalaman/shellcheck
If you’re interested I’ve written a git hook for it that runs a check when you git commit:
https://github.com/alblue/scripts/blob/main/shellcheck-pre-c...
You should also check out her Google shell script style guide:
https://google.github.io/styleguide/shellguide.html
-
Correct Git commits with Git-autofixup
I wrote my own tool for this which allows you to fix up a file based on the last time you changed that file, or on a specific commit. It will then execute an interactive rebase to that point as well as taking care of stashing and then restoring unrelated files.
https://github.com/alblue/scripts/blob/master/git-fixup
I like the idea of having the editor definition return “true” instead of showing it; I’ll have to add that later.
What are some alternatives?
git-absorb - git commit --fixup, but automatic
rust_cmd_lib - Common rust command-line macros and utilities, to write shell-script like tasks in a clean, natural and rusty way
magit - It's Magit! A Git Porcelain inside Emacs.
shellharden - The corrective bash syntax highlighter
misc-gitology - An assortment of scripts around Git
makesure - Simple task/command runner with declarative goals and dependencies
git-instafix - Amend old git commits with a simple UI.
GUIDeFATE - GUI Design From A Text Editor
stgit - Stacked Git
oil - Oils is our upgrade path from bash to a better language and runtime. It's also for Python and JavaScript users who avoid shell!