3 ms·
This article mentioned a while ago had relevant info: https://news.ycombinator.com/item?id=22689301 https://news.ycombinator.com/item?id=22689301 In my experie
by ryanianian 6y ago
This article mentioned a while ago had relevant info: https://news.ycombinator.com/item?id=22689301 https://news.ycombinator.com/item?id=22689301
In my experience, ensure you don't change the code as you move it, don't rename files and move content at the same time, and don't move "too much" code in a single commit. Around 2k lines at a time seems to be a good number. Maybe some languages/structures are easier for git to analyze when doing blames.
- kccqzy 6y agoHow do you not change the code as it's being moved, when you need to update #include directives, imports, and other file paths?
- ryanianian 6y agoSometimes it is unavoidable, but in general minimize it. Don't refactor a class and rename it at the same time. Hopefully moves just result in imports and paths changing, something that is not likely to confuse a blame (and rarely do I care about the blame lines on #includes/imports)
- derefr 6y agoIt's easy if not every commit needs to compile. :)
- vimax 6y agoNew branch, make two commits. Squash merge the branch as a single commit.