There are about 5 relevant questions on this on SO, but I did not yet find the answer. The closest I have got is with the idea from this answer.
git diff -w --no-color | git apply --cached --ignore-whitespace
This doesn't work. It will add all the changes, but I want to do it per partes. Is there an improved way that also adds the behaviour -p
flag of git add
?