To migrate my project from SVN to GIT, other than the instructions given by my colleagues, I also consulted the following links and chewed on the many help tips turned up from Google (honestly most of them are left undigested).
Converting a Subversion repository to Git
Converting from Subversion to Git
So all of the wonderful links have listed the steps and commands. I just want to retell my trials and errors. Actually just errors.
First Trial: Migrating the whole SVN (history, branches and tags) to GIT. Failed Completely!
Found possible branch point
Solution: .Go to git/config file and delete all the branches and tags entries under the svn-remote section
RA layer request failed
By StackOverFlow, this is because some revision get messed up, so need to go to the next GOOD revision and continue from there.
However since this happens at an ever more frequent rate, it killed my effort of migrating whole history to GIT.
Second Trial: Migrating without the history. Successful!
Third Trial: Converting SVN externals to GIT sub-modules. Successful eventually!
Add old externals as sub modules were relatively easy. However, when I tried to remove them I had a hard time. Of course, stackoverflow came to rescue, as the solution found at here.
- Delete the relevant section from the .gitmodules file.
- Delete the relevant section from .git/config.
- Run git rm --cached path_to_submodule (no trailing slash).
- Delete the now untracked submodule files
- rm -rf path_to_submodule
However, even after I followed the steps, I still received the following errors as the following:
A git directory for xxx is found locally with remote(s):<br/><br/>
So later I found that I also need to delete the relevant folders in .git\modules.
But after the migration, my experience with GIT has been relatively smooth.
So far. So good.