简体   繁体   中英

Migrating SVN to Git

I am trying to migrate my svn repository to git.

I am using Atlassian's migration instructions

  1. First I got my authors and mapped them

    java -jar ./svn-migration-scripts.jar authors $SVN_ROOT/$SVN_PROJECT > authors.txt

  2. Then I did an svn clone

    git svn clone --stdlayout --prefix='' --authors-file=authors.mapped.txt $SVN_ROOT/$SVN_PROJECT working.git

  3. Then clean-git

    java -Dfile.encoding=utf-8 -jar ../svn-migration-scripts.jar clean-git --force

It fixes the branches

$git branch
gary1
* master

But not the tags

Here is my remote branches:

$git branch -r
gary1
origin/gary1
origin/master
tags/0.1.0+13
tags/0.1.0+24
tags/0.1.0+5
trunk
trunk@64018
trunk@64019

Any advise?

It looks like the Atlassian tool has changed your tags to branches. The easy fix would be to check out the tag branch

git checkout tags/0.1.0+13

Then create the needed tag on the head of that branch

git tag -a v0.1.0.13

Then merge into the appropriate branch https://git-scm.com/docs/git-merge

git checkout master
git merge tags/0.1.0+13

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