What is the best version control method for large-scale refactoring?
My typical programming style (actually for writing documents) is as quickly as possible, and then refactoring. As a rule, refactoring occurs simultaneously with the addition of other functions. In addition to the standard refactoring of classes and functions, functions can be moved from one file to another, files become divided and merged, or simply reordered.
I am currently using version control as a lone user, so at this stage there is no problem interacting with other developers. However, version control gives me two aspects:
- Backup and the ability to return to a good version of "in case".
- Looking at the story, I tell how the project and the flow of ideas progressed.
I use mercurial on windows using TortoiseHg, which allows me to select hunks for fixing. The reason I mention this is because I would like some advice on granularity of commit in refactoring. Should I share refactoring with functionality always added when committed?
I looked at the answers. Refactoring and source control: how? but he does not answer my question. This issue focuses on collaboration with the team. This focuses on having a story that is understandable in the future (assuming I am not rewriting the story, as it seems to some VCS).
source
share