Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

git reset --hard makes a lot of sense with printf debugging.

A typical workflow starts by adding printfs or whatever your equivalent is until you've narrowed down the bug. Then you fix the bug, keeping the printfs until the fix is confirmed. Then you use git gui or an equivalent tool to form the commit(s) for your bugfix. Finally, use git reset --hard to remove the debugging detritus.




Ok, I have to admit I've forgotten people actually (need to) do development/debugging like that.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: