Skip to content

Instantly share code, notes, and snippets.

@alexfu
Last active September 17, 2021 07:39
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexfu/9f152162c105f1f5e787f68f03605423 to your computer and use it in GitHub Desktop.
Save alexfu/9f152162c105f1f5e787f68f03605423 to your computer and use it in GitHub Desktop.

git addi

Add git files interactively from the command line.

asciicast

Requirements

Step 1

Add the following alias to your global .gitconfig file

[alias]
    addi = !git add $(git status --porcelain | fzf -m | awk '{print $2}')

* The ! tells git to run an external command instead of a subcommand.

Step 2

Run git addi. To select multiple files, use Shift + Tab. Press ENTER when done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment