What are the benefits of using git-svn over a regular svn client?

I saw several posts recently suggesting that if you need to create a team with an SVN repository, git is a better client than svn:

These articles seem to focus on how, and save on why. Help me convince myself, boss and peers, that there are advantages to using git-svn over the official svn client!

Note. The relative merits of git and svn are well considered. I am more interested in this question, with which the client should use in the agreed SVN repository.

+6
source share
2 answers

For me, the main advantages of using git-svn (and CVS bridge) are that

  • I have the whole story locally for viewing and git-blame ,
  • I have full version control when it is disabled, for example. on the train
  • I can take full advantage of the area / index of the intermediate gear, for example. only specific lines
  • I only need to post the changes when I'm happy with it (i.e. I experimented with something, and it worked, or I made the story connected)
  • I can easily transfer a series of patches for review.

As a bonus, the git interfaces to SVN and CVS allowed me to abandon the argument if we should switch our CVS repository to subversion (lasting from 3 years) or go for something really cool and right away (current starting from 2+ years )

You really don't need a solution to manage what developers should use. What is used for your central repository can be called up by other arguments in any case (for example, building, viewing and testing the infrastructure).

+5
source

For me it's all about local branches. When the time comes to start working on BigNewFeature, I can create a new branch (locally) with git and start working on it, performing every step in its path, as I like. Then, when someone inevitably interrupts me from working on BigNewFeature and wants me to fix SmallTypo, I can switch to the main branch, fix the typo, and then click it on svn. I can return to my BigNewFeature branch and continue my business.

These cheap local branches give you great flexibility as a developer that you just don't get when you have to deal with svn forking and merging. I'm not afraid to branch out and experiment quickly. Then, when I am satisfied with the results, I can combine everything I want into a master and click on SVN in a set of clean, easily distinguishable commits.

+4
source

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


All Articles