Sometimes you have to ask yourself, “Should I commit this?”

Let’s say you’re working on some code. Sam is working on the same thing. You may think to yourself, “I don’t want to step on Sam’s toes,” and then comment out some of Sam’s code go about your business.

Don’t commit this commented-out code. It’s a horrible idea. The primary reason you’re using git and GitHub is so that you have a record of changes. You don’t have to worry about this kind of thing, because the commented-out code is in the history.

Delete Sam’s code and keep moving. Everything else will come out in the review of your pull request. (You are using pull requests and peer review, aren’t you?)

Don’t commit commented code.