I run these command to commit:
git add --all -p
// Then use "y" to stage hunks, and use "n" to not stage hunks
// I want to commit hunks which staged with "y"
git commit -a
// Then commit all
But when I check, all of hunks which used "y" and "n" in git add committed to branch How could I just commit just hunks which I selected when using git add?