Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Refactoring and non-refactoring changes as separate check-ins?

Do you intermingle refactoring changes with feature development/bug fixing changes, or do you keep them separate? Large scale refactorings or reformatting of code that can be performed with a tool like Resharper should be kept separate from feature work or bug fixes because it is difficult to do a diff between revisions and see the real changes to code in amongst the numerous refactoring changes. Is this a good idea?

like image 692
Phillip Ngan Avatar asked Dec 22 '22 08:12

Phillip Ngan


1 Answers

When I remember, I like to check in after a refactoring in preparation for adding a feature. Generally it leaves the code in a better state but without a change in behaviour. If I decide to back out the feature, I can always keep the better structured code.

like image 194
Duncan McGregor Avatar answered May 18 '23 22:05

Duncan McGregor