DEV Community

Discussion on: Stage with confidence using git add -p

 
lukad profile image
Luka Dornhecker • Edited

I am not an adherent of tiny commits at all.

I'm not adherent of tiny commits either but I like to keep my commits clean and have them not change too many things that are not related.
For example when I work on a feature and I do some refactoring unrelated to that, I like to keep those changes separate.

How is it better than git diff?

You can discard (delete) changes that you don't want to commit by pressing d and you can edit the diff you are currently viewing by pressing e.
It's just a matter of preference though.