Live data from Hacker News

Show HN: Git-Add–Interactive with Enhancements

github.com

21–30 of 45 posts

Re: Show HN: Git-Add–Interactive with Enhancements

#21
I'm a serial "git add -p" user. (Micro-review before every commit is super healthy imo).

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.

Re: Show HN: Git-Add–Interactive with Enhancements

#22

I'm a serial "git add -p" user. (Micro-review before every commit is super healthy imo). 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 termi…

I used to do patch operations and hunk-editing for everything and really enjoyed it. It definitely helps to put a fresh view on the code and see anything missed.

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.

Re: Show HN: Git-Add–Interactive with Enhancements

#23

I'm a serial "git add -p" user. (Micro-review before every commit is super healthy imo). 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 termi…

same I just wish it would split things even more by default

Re: Show HN: Git-Add–Interactive with Enhancements

#24

I'm a serial "git add -p" user. (Micro-review before every commit is super healthy imo). 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 termi…

[deleted]

Re: Show HN: Git-Add–Interactive with Enhancements

#29
post #20

It would be nice if this had the same interface for `git add -i` allowing you to type in numbers or letters. ** 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.

Thanks for the feedback. The latest version improves compatiblity with the perl version: https://github.com/cwarden/git-add--interactive/releases/tag...

Re: Show HN: Git-Add–Interactive with Enhancements

#30
post #2

Congratulations on publishing this. I use `git add -p` quite a lot, and this project looks interesting! 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.

Since the OP is familiar with the Go ecosystem, they could probably use vhs[1] easily to programmatically create an interactive demo GIF. That has worked very well for me in the past. [1]: https://github.com/charmbracelet/vhs

Good thinking. I added a vhs tape: https://github.com/cwarden/git-add--interactive/blob/main/RE...
Post reply on HN