Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Mr-Myrk5335yso that's what the "stage hunk" does in sublime merge. I always thought It was a term for when I am singing karaoke
-
ddephor45115yYeah, that's possible with git commit -p.
But then you commit an untested state, so you have to test that commit afterwards anyway.
It makes some things a bit more comfortable, but you'd better get rid of those debug stuff early or incorporate it somehow permanently without affecting your release build. -
Leya17765yHow about using a logging framework or a simple debug flag in your code to control if you need the debug output or not?
-
Mr-Myrk5335y@ElCapitan because you often need to debug some bit of the code only once and committing it and also including another framework will just bloat your code. Although I am aware writing shitty dependency hell code is the "in" thing to do in 2020.
-
Leya17765y@Mr-Myrk well of course it always depends on many factors. If you're working on a quick and dirty script for yourself or the logging framework would be bigger than the actual software it's probably better to just do it as described here or maybe even just to remove the code after testing but when I would be working on a medium to large sized project with other collaborators I probably would just pay the price to have one dependency more if this means I don't have to constantly remove and add debugging code again.
-
One of my biggest gripes with the VS integrated GIT client is it doesn't support single line commits.
Related Rants
I just found out you can commit single lines of a file without the necessity to remove temporarily debug lines every time ... it has blown my mind.
rant
git
commit
pro tip