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.
Written by Matthew McCullough
Related protips
1 Response
This only the patch mode. The interactive add is -i, --interactive.
Still, good tip : )
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Git
Authors
khasinski
591.1K
dmichaelavila
500.4K
Related Tags
#git
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#