简体   繁体   中英

Cloning non-standard layout SVN repo to git

I am trying to get SVN repo moved to Git using git-svn and I didn't have any problem with repos with standard layout but the project I am trying to clone has pretty non standard layout with branches and tags in multiple directories. I went through other threads that explain similar issues but none of the advices there helped me.

I used the following command to clone the repo

git svn clone --authors-file=users --trunk=trunk --branches=branches/* --branches=branches2/* --branches=branches3/* --tags=tags/* --tags=archived_tags/* https://svn.host.co.uk/repo/Project Project

It always failing with the same error on the same tag

Rebuilding .git/svn/refs/remotes/tags/TCH_2.8.7/.rev_map.eced6b69-9fdc-4be9-b2ce-1a6ca0e06ac4 ...

fatal: bad revision 'refs/remotes/tags/TCH_2.8.7'

rev-list --pretty=raw --reverse refs/remotes/tags/TCH_2.8.7 --: command returned error: 128

Is there a way to skip this particular tag or any other way to get only few branches I can pick as I don't need the whole history of this really big project that's been actively developed for more than 6 years?

I tried several regex with --ignore-paths but it didn't work.

git svn fetch --ignore-paths="^[^/]+/tags/TCH_2.8.7"

Thanks in advance

write-tree: command returned error: 128

is an often reoccuring error.

May I suggest you to look at How do I resolve a git-svn index mismatch? , it has a lot of information..

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM