Software Refactoring Version Control

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).

+3
source share
6

, :)
: : :

  • ( )
  • ( ).

: , .

, , , , . .

+9

?

; - , . :

  • ( ),
  • ( ).
+3

. , . , uncrustify , . . uncrustify .

+2

// , .

- , //, , , .

, . , , /.

+2

- + 1 . . , . , - , , . @Amardeep, , , , , . , . , , . . - - .

+1
  • . , , .

  • . .

  • . .

  • , . , .

  • , .

Often I will start working on new features or bug fixes or something else to find that if I reorganize things that way, new functionality will be much easier to add. Usually I delete (or save elsewhere) my changes so far, refactor / test / submit, and then return to work on new functionality. Ideally, I spend 90% of my time refactoring, and every new feature, fixing bugs, improving performance, etc. - This is a simple one-line change.

+1
source

Source: https://habr.com/ru/post/1747680/


All Articles