0

Scenario:

We have been using SVN for managing our code base. SVN repo is setup on a linux server and developers work with this repo using tortoise svn on windows os .

Now, we need to migrate to GIT as we are terrified with svn when it comes to branching and merging. I have been provided another linux server where I can set up a git repo and then train developers to move to git from svn.

I read the git-svn official documents and a few other google search related results. I think I have made a mistake but not sure :

I extracted svn user info using the svn log command

Went to the linux server and used git svn clone command with the -s flag since we have a standard layout.

Installed msysgit on my windows machine and thought of cloning the git repo so that I can test git repo while developers continue to push their changes to svn repo as usual. Once, people have been trained with git then we could have moved to git repo completely.

The concern out here that I am not sure if this is the correct way. Since, all the migration links, docs talk about *nix systems, not sure if this is how it is to be done. Can someone please provide some inputs of what the correct procedure should be and how should I proceed with this migration.

f-z-N
  • 1,645
  • 4
  • 24
  • 38
  • Are you required to move to git? From what I've read, it sounds like Mercurial is much more compatible/workable on Windows than git. If you are required to go to git, have a look at the "Related" posts on the right here; there are at least two about migrating from SVN to git. – alroc Jan 22 '13 at 16:49

1 Answers1

0

The only possible problem I'm aware of is that of line endings. Git for Windows is usually installed with the core.autocrlf setting turned on in the system configuration. When you do git svn clone on a POSIX system, the files in your repository supposedly will end up with Windows line endings (CR+LF) (well, at least that's what was my own experience), and if you subsequently check out such a repo on a Windows machine with the setting above active (and not overridden) then modify a file and commit this change, Git is likely to try to convert the line endings in that file to LFs, thus recording a 100% rewrite which is not what was intended.

The solution is probably to override that setting in each developer's repository or try convert the history (using git filter-branch) to have LFs in the repository before switching to Git.

In either case, first try to play with your new repository and see what happens.

See this for more background.

Community
  • 1
  • 1
kostix
  • 51,517
  • 14
  • 93
  • 176