What would you recommend to help developers become more comfortable deleting dead code (as opposed to commenting it out) with the confidence they could find it later in source control?
I build things with my hands. The human behind Shift - https://laravelshift.com, master of Git - https://gettinggit.com, and author of "BaseCode" - https://basecodefieldguide.com
Commented code is dead code - REMOVE IT! Let Git do its job.
But yes, I recommend doing it as a separate commit with a clear commit message on what code was deleted so you have the best chance of finding it again.
However, from my experience, it's rare you'll actually look for code this way. Most people just go back to a known point in history to see old code instead of trying to pinpoint the exact commit.
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.
What would you recommend to help developers become more comfortable deleting dead code (as opposed to commenting it out) with the confidence they could find it later in source control?
Commented code is dead code - REMOVE IT! Let Git do its job.
But yes, I recommend doing it as a separate commit with a clear commit message on what code was deleted so you have the best chance of finding it again.
However, from my experience, it's rare you'll actually look for code this way. Most people just go back to a known point in history to see old code instead of trying to pinpoint the exact commit.