0

I'm able to complete the conversion, but don't like the resulting folder structure. The repository I'm converting to GIT is a Visual Studio Solution that contains about 10 Projects.

The commands I'm using are:

git svn init https:/svn.example.com/:8443/svn/myrepo --no-metadata
git config svn.authorsfile ./users.txt
git svn fetch

The operation completes with a structure like this:

.git
trunk
    Project 1
    Project 2
    ...
    Solution.sln

I would like to eliminate the output subfolder (trunk/) completely, like this:

.git
Project 1
Project 2
...
Solution.sln

I don't seem to be seeing the option to set the output folder. How can trunk/ be eliminated?

rwkiii
  • 5,716
  • 18
  • 65
  • 114
  • 1
    Try `git svn clone https:/svn.example.com/:8443/svn/myrepo --authors-file=users.txt --no-metadata --trunk=trunk`. This sets `trunk` as a branch, not a directory. See [`--trunk`](https://git-scm.com/docs/git-svn#Documentation/git-svn.txt--Tlttrunksubdirgt) – phd Jul 21 '22 at 13:40
  • By adding this it looks like I'm basically moving the .git folder into to the trunk/ folder? I think that'll work, too! Will give it a try and update the thread. – rwkiii Jul 21 '22 at 13:43
  • Apparently, my last comment is a wrong assumption. I ran the command with --trunk=trunk and .git was initialized in the same location. So, my second assumption is that --trunk= should be set with a fully qualified path? I tried a relative path of ./ earlier and it made no difference to output structure. – rwkiii Jul 21 '22 at 13:48
  • Try `--trunk=/svn/myrepo/trunk` or even `--trunk=https:/svn.example.com/:8443/svn/myrepo/trunk` – phd Jul 21 '22 at 13:52
  • `--trunk=.` worked (I think ... it's running now, but looks good so far). Thank you! – rwkiii Jul 21 '22 at 13:53

0 Answers0