Can you give an example, how I add the path to my old svn and create a git folder from it, that contains the whole history and all branches/tags?
I found this site is this worth a try? It uses svnpull
, which is not on my system can I use repopuller
instead?
I installed reposurgeon with
apt-get install --no-install-recommends xmlto asciidoc unp
wget http://www.catb.org/~esr/reposurgeon/reposurgeon-3.7.tar.gz
unp reposurgeon-3.7.tar.gz
cd reposurgeon-3.7
make
make install
(I would install without the recommendations, cause that would be about 700MB not needed here)
It seems like the site is a bit outdated.
svnpull is replaced by repopuller by now. And you don't need that either if you are on the same server.
I adapted the script:
and entered:
I filter out the .gitignore files like github has documented with filter-branch because otherwise, they will create commits in all tags (see note below). You have to create a new .gitignore file when you are done.
This may take a while, so you should start it inside
tmux
orscreen
withTake care, that all your tags are git conform.
I got the error
So I cleaned up the svn repository and removed this branch, so all tags and branches are conform:
and deleted it from all history with this script: How do I remove an SVN tag completely that contains spaces?
Then I started over with the script:
Note:
Without removing the
.gitignore
files, it looks all the same in git as in SVN before except one thing: all tags are ordered in the log at the exact date they were tagged, instead of the commit they started ad. It seems a.gitignore
file is added there in the conversion process to each branch and tag, but that .gitignore-file results in a commit inside those tags with the timestamp of the tag-creation.New tags are ok, they appear right at the revision they belong to. (see Convert an SVN repository to git with reposurgeon without creating .gitignore files?)