0

I have a number of client repositories in Subversion that are now being changed to git. The client does not care about the change history, so what I'd like to do is:

  • Import/ convert using Bitbucket
  • Initialize a git repository in the current svn-controlled folder
  • Start using git

Is this possible? Is it going to be a giant pain? The only real reason it matters is because I'd like to do this on the servers as well to avoid having to create a new project on each server and re-point the Apache/ Nginx/ etc configuration files.

Tom
  • 22,301
  • 5
  • 63
  • 96
  • @JimPuls - I looked at that one, but I don't need the history and I don't want to clone a new folder (which it looks like that requires, at least at a glance). – Tom Jul 01 '14 at 18:38
  • 1
    `rm -rf \`find . -type d -name .svn\` && git init` - only sort of joking – tvanfosson Jul 01 '14 at 18:47
  • @tvanfosson That's exactly the answered that uccurs to me, not joking. If you don't want history, that'll do it. But throwing away history seems crazy to me. It sometimes comes in very handy. – Don Branson Jul 01 '14 at 21:24

1 Answers1

1

"SVN-contollled folder" is too wide definition. Does it means "Working Copy of SVN repository"?

Anyway, in these svn-controlled folders you can

  • git-svn clone -r HEAD:HEAD URL/OF/SVN in order to get Git-repo from SVN-HEAD without history
  • Remove from .git/config file [svn-remote ...] section (forget about SVN origin)
  • Remove .svn directory (if it was SVN's Working Copy)
  • git co in order to get files from index into working tree
Lazy Badger
  • 94,711
  • 9
  • 78
  • 110