Re: Can we make interactive add easier to use?
- From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
- Date
- Oct 14, 2016, 13:46 UTC
- Message-ID
- <vpqfunz2gc9.fsf@anie.imag.fr>
- In-Reply-To
- <CAHd499AnuVximRgM0MKdq5JC-hwkrhox6bK_KA+XGrawoz2W+g@mail.gmail.com>
Robert Dailey <rcdailey.lists@gmail.com> writes:
Show 12 quoted lines
> 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/