scripts
git-instafix
scripts | git-instafix | |
---|---|---|
2 | 1 | |
3 | 22 | |
- | - | |
0.0 | 7.5 | |
about 2 years ago | 30 days ago | |
Shell | Rust | |
MIT License | 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.
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.
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?
rust_cmd_lib - Common rust command-line macros and utilities, to write shell-script like tasks in a clean, natural and rusty way
vim-fugitive - fugitive.vim: A Git wrapper so awesome, it should be illegal
shellharden - The corrective bash syntax highlighter
git-absorb - git commit --fixup, but automatic
makesure - Simple task/command runner with declarative goals and dependencies
magit - It's Magit! A Git Porcelain inside Emacs.
git-autofixup - create fixup commits for topic branches
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!
ShellCheck - ShellCheck, a static analysis tool for shell scripts