- S to automatically split all hunks
- G to set a global filter on hunks to show
- A to automatically accept all hunks (after auto-splitting and global filter are applied)
Or at least, it would require first a massive effort to align the maintainers on the idea of a new language, like Rust in the Linux kernel
Just re-write in C
I knew that you could place a `git-xyz` executable and you can call it as `git xyz`. I didn't know you could do it with flags !?!
A small video or some screenshots would help a lot. If you can record interactivity with ascii-cinema, that will be even better.
Then I discovered Vim fugitive. It allows to go through the diff and stage chunks so intuitively, it changed the way I work. Just j/k to move around, = to expand file, s to stage selection, c to commit. The process of reviewing changes became very natural and actually enjoyable. I like the feeling of control it gives and how it makes focused commits painless while not disrupting the flow.
As for licensing, I'm happy to change the license. I have no strong feelings on the subject, and don't know what restrictions GPLv2 imposes on a port to another language.
I made an alias a while ago I use frequently:
af => !f() { git add -p $(git diff --name-only | fzf); }; f
When you have a large diff, it's get unruly quickly to "add -p".This just prompts you with a fuzzy find of the files that have changed and you can just pick one to go through the "add -p" process for that file.
For the terminal averse, IDEs usually have "jump to next change" and a tab for the changed files that can achieve the same.
Eventually I moved on to going line-by-line with a GUI tool. In my case Git-cola, but I'm not positive I'd recommend it because it's quite slow on Windows.
** Commands **
1: status 2: update 3: revert 4: add untracked
5: patch 6: diff 7: quit 8: help
What now>This allows you to either type in (p) or (5) to go into patch mode.
It often did the wrong thing IME, but YMMV.
lazygit (of course): https://github.com/jesseduffield/lazygit
git-machete: https://github.com/VirtusLab/git-machete
rebase-editor: https://github.com/sjurba/rebase-editor
i = !git add -N . && git add -p
`git i` lets you interactively add new files as well as existing onesI think it’ll fit nicely alongside scmpuff which I’ve been using for years (and at this point refuse to ever give it up): https://github.com/mroth/scmpuff