3 ms·
With fzf you can add lots of files to git while skipping some if you want: fza = "!git ls-files -m -o --exclude-standard | fzf -m --print0 | xargs -0 git a
by bloopernova 3y ago
With fzf you can add lots of files to git while skipping some if you want:
fza = "!git ls-files -m -o --exclude-standard | fzf -m --print0 | xargs -0 git add"
With that in the [alias] section of a gitconfig file, running git fza brings up a list of modified and not yet added files, space toggles each entry and moves to the next entry.
That alias as well as fzf+fd really speed up some parts of my workflow.
Oh and shameless plug for my guide on what to include in your zsh setup on macOS: https://gist.github.com/aclarknexient/0ffcb98aa262c585c49d4b3f3ae24019 https://gist.github.com/aclarknexient/0ffcb98aa262c585c49d4b...
- stinos 3y agoAdd the preview to see what you're actually stashing: git ls-files -m -o --exclude-standard | fzf -m --print0 --preview "git diff {1}" | .... And that's just the start: it could even be that by binding a key to the fzf reload command to then display the diff in it's finder, and in turn a key to stage the selected line, you could turn that into an interactive git staging tool.
- bloopernova 3y agoNice. I'll have to try that out!
- kstrauser 3y agoThat blew my mind. I've used fzf a couple time here and there, but now I Get It. Thanks!