News for hackers. Stuff that matters.
Re:New(ish) command line tools by AmpsterMan on Wednesday April 13, 2022 @02:11AM (#31011686)
fzf is a wonderful little tool. I use this script so much:

git branch | fzf | xargs git checkout

Re:New(ish) command line tools by bloopernova on Wednesday April 13, 2022 @09:05AM (#31014126)
Related git+fzf:

    [alias]
      fza = "!git ls-files -m -o --exclude-standard | fzf -m --print0 | xargs -0 git add"
Then if you run "git fza" you'll get a list of changed files in your repo, which you can use TAB to select/deselect. Hit enter and the selected files will be staged, ready for a commit. Extra cool is that it works from any subdirectory of your repo because it always lists files from the root of the repository. It's really useful for selectively adding lots of files from the command line.

I then alias "ga" to "git fza" for even less typing :)

Re:New(ish) command line tools by omair_inam on Wednesday April 13, 2022 @07:45AM (#31013518)
Excuse my ignorance, but what does this command do?
Re:New(ish) command line tools by _bohm on Wednesday April 13, 2022 @08:51AM (#31014006)
It pipes a list of available git branches into fzf, which lets you filter them by fuzzy string match. When you hit enter, it will take the best matching one and switch to that branch
Re:New(ish) command line tools by omair_inam on Wednesday April 13, 2022 @12:23PM (#31016614)

            _ ._  _ , _ ._
          (_ ' ( `  )_  .__)
        ( (  (    )   `)  ) _)
       (__ (_   (_ . _) _) ,__)
           `~~`\ ' . /`~~`
                ;   ;
                /   \
  _____________/_ __ \_____________