3 ms·
Committing commented out code clutters the codebase, clutters the commit history, degrades the searchability of the commit history, and is usually a big middle
by stevebmark 11y ago
Committing commented out code clutters the codebase, clutters the commit history, degrades the searchability of the commit history, and is usually a big middle finger to your teammates by saying "this thing I use for debugging belongs in the main branch." Not knowing how to efficiently use the Git API is a fault of the committer, not an excuse to clutter the code. A comment with the exact command to run such as "// To see how this blah blah blah, run `git show 049fa0293f:path/to/file.elm`", as suggested, makes this a moot point anyway.
- codemac 11y ago> [commenting the sha] makes this a moot point anyway. No, it does not. Emacs has gone through 4 version control systems, I can't imagine how they'd refer to it in a comment. As someone who's been through several, I guarantee you that git is not the final frontier of VCS. Also - if you intend the comment to communicate to your team (as this commit does.. did you read it?), then your other comments also make little logical sense.