I have a SVN repository that looks something like this:
I run:
git svn clone --stdlayout https://[SVN URL]/svn/MyProject "C:\_build\WorkingFolders\Myproject_gitcopy"
The command appears to execute successfully.
I expect to see the "branches", "tags" and "trunk" folder in the cloned directory since we cloned the entire repository. Instead, I see "common", "doc", "extlib", and "proj".
It appears that git has only cloned the trunk of my repository. Does anyone know why this might be, and how to fix it? Or am I just seeing it incorrectly?
Thanks in advance for any help!
Actually, git svn
is trying to help you by being smart :-).
git treats tags and branches differently from Subversion. In Subversion, tags and branches don't exist as separate technical concepts; they are just copies of the tree under special directories.
git actually has branches as "real" objects. git svn therefore automatically converts Subversion branches and tags to git branches (*).
To see branches in git, do
git branch -a
(-a makes it include remote-tracking branches). That should show you the branches and tags from the SVN repo.
(*) Note: git svn does not create git tags from Subversion tags, because in Subversion there is technically no distinction between tags and branches (it's just a convention). Since it's not entirely clear how to distinguish tags & branches in Subversion, git svn just imports them all as branches. See e.g. Debian bug #501761: git-svn --tags should at least /try/ to handle tags as tags.