Last Updated: October 12, 2018
·
1.507K
· matthewmccullough

Git interactive add

Git supports adding files at the wildcard level:

git add *.txt

and Git support adding specific files:

git add file1.txt

but Git also supports adding portions of a file through a mode called interactive (or patch mode) add:

git add -p *.txt

or

git add -p file1.txt

This prompts you, in sequential fashion, to stage, split (into smaller pieces), or skip each changed hunk of the change files that you've listed.

1 Response
Add your response

This only the patch mode. The interactive add is -i, --interactive.
Still, good tip : )

over 1 year ago ·