Subject: Re: Can we make interactive add easier to use?

From: Matthieu Moy <[email-masked]>
Date: Fri, 14 Oct 2016 15:46:46 +0200

Robert Dailey <[email-masked]> writes:

> Normally when I use interactive add, I just want to add files to the
> index via simple numbers, instead of typing paths. So I'll do this as
> quick as I can:
>
> 1. Type `git add -i`
> 2. Press `u` after prompt appears
> 3. Press numbers for the files I want to add, ENTER key
> 4. ENTER key again to go back to main add -i menu
> 5. Press `q` to exit interactive add
> 6. Type `git commit`
>
> This feels very tedious. Is there a simplified workflow for this?

My workflow is to ... not use "git add -i" ;-).

To add patch hunks individually, "git add -p" jumps directly to the
"patch" inner loop of "git add -i".

To add whole individual files, a plain "git add" using zsh's smart
completion (autocompletes only files for which "git add" is not a
no-op), or globs.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/