I always use git add -p when I want to commit. It will go through each chunk of changes and ask if I want to add it or not. It’s a great way to review what you are going to commit, spot and skip some leftover debugging code, and it allows you to make smaller commits at the same time.
You can even edit the patch before adding it, which is daunting at first but can be quite convenient to quickly omit a leftover print statement in the middle of an otherwise valid change.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I always use
git add -p
when I want to commit. It will go through each chunk of changes and ask if I want to add it or not. It’s a great way to review what you are going to commit, spot and skip some leftover debugging code, and it allows you to make smaller commits at the same time.You can even edit the patch before adding it, which is daunting at first but can be quite convenient to quickly omit a leftover print statement in the middle of an otherwise valid change.