Never commit code that’s been commented out 🚫
I’ve never understood the reasoning behind committing code that’s been commented out. 🤔
I assume it’s to keep old versions of the code around just in case the new code doesn’t work, but that’s just bizarre. ⚠️
Keeping track of old versions is the reason we use a version control system in the first place❗️
Why was the code commented out❔
Does it work❔
Should it work❔
Has it ever worked❔
Is it something we should strive towards or run away from❔
Code that’s been commented out is worse than useless, because every time it’s read, it raises questions like these without providing any answers. ❌
It only serves to confuse and distract from the code in use. 🤯
https://t.me/pgimg/134
〰〰〰〰〰〰
#Tips #Git
@ProgrammingTip
Post #436
10.1K