Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git for SVN users

Tags:

git

svn

I have been a very avid git user for quite a while now. However I often note that seasoned SVN users seem to have a lot of issues with using git. Now I am looking for resources to make git more available for people who have been used to using SVN for a long time and developed a habit out of the quirks of SVN.

I know there is the git svn crash course, but this does not really give the information I need. While this easily maps the common SVN commands to similar Git commands, people tend to use more complex workflows, which are often not easily mapped just by mapping commands from one tool to the other.

For example a lot of people I know usually tend to keep multiple versions of a versioned software around in different directories, to be able to easily switch between revisions. For me this seems like a kludgy workaround that Git handles easily through a git stash, git checkout workflow. Also I have noted that people using SVN tend to think differently about branches. Whereas in SVN all commits from a branches fully belong to that branch (because they concern that directory) in Git there really is not such thing as "a commit from a branch", because each branch will include all commits reachable from that current branch state.

Is there any tutorial, which maps theses concepts, to make Git more accessible to SVN users who are forced to use it?

like image 217
LiKao Avatar asked Nov 15 '11 22:11

LiKao


People also ask

Can you use SVN with Git?

The git-svn tool is an interface between a local Git repository and a remote SVN repository. Git-svn lets developers write code and create commits locally with Git, then push them up to a central SVN repository with svn commit-style behavior.

Does Tortoisesvn work with Git?

It totally works. you have check the use svn repository and possibly specify username so it prompts for password.... but it works.


1 Answers

We just had a SVN to Git migration at work. One of the most important thing, was to not scare the users. Unfamiliar tools make people uncomfortable. That's why it's essential to make the transition as smooth as possible.

  • help with the setup. SVN users probably do not know how to setup ssh keys
  • tell them the similarities first. These commands are rather similar
    • git commit
    • git log
    • git branch
    • git merge
  • after some time you can present more advanced topics
  • give people the time to use their old workflow on the new system and when they are ready to proceed to the next level present advanced topics

Not all people will advance at the same speed, some might even use Git just as a replacement for SVN. That's not a problem per se. It's more important that those, who are willing to learn more and those who want to use the tool the way, it was designed, get the appropriate support. They will help others to make some progress.

We tried to set up a playground, which was rather useless. Nearly all people, who did not already know Git, did not try out anything. They just want to get their work done. and don't have the time to play...

Still, all in all it was a good success and there are lots of people starting to use advanced features. I wouldn't have dreamt, that people will be working with multiple remotes only two month after the launch, but they are. They are branching and merging like pros, and when they have problems they ask.

To host our repositories we decided to set up an in house Gitorious server. This has some big advantages. First it comes with a nicely designed UI and second it's just Rails. If you know MVC, you can rather easily customize it to your needs.

like image 95
topek Avatar answered Sep 30 '22 18:09

topek