简体   繁体   中英

How to clone local svn work directory to git repo and upload to github?

The task is to migrate from local svn work directory to git repository and upload to remote github.

System: Windows 10 64 bit

git-svn version: 2.21.0.windows.1 (svn 1.9.7)

1- I installed TortoiseGit and try to apply git clone command and provide the origin to point to the github url using

username:tokem@github.company.com/repo.git

I got this error: "Using existing [svn-remote "svn"] svn-remote.svn.fetch already set to track :refs/remotes/git-svn"

2- Using GitBatch I run:

svn log -q svnurl | grep '^r[0-9]' | awk '{print $3}' | sort | uniq > authors.txt

I got the authors.txt correctly then I run:

git config --global --unset http.proxy 

and

git svn clone file:///C/Users/Documents/GitHub/Repo --authors-file=C://authors.txt C://Users//Documents/GitHub/Repo_Git

I got the same error: git-svn windows Using existing [svn-remote "svn"] svn-remote.svn.fetch already set to track :refs/remotes/git-svn

Till now I couldn't clone local svn to git and then to upload to github, please help

I read git-svn documentation and read svn2git tool guide but don't help!

Thanks in advance, Mariam

git-svn is better suited if you're going to push/pull commits between git and svn. For a straight export, svn2git is a much better solution and way faster.
https://github.com/svn-all-fast-export/svn2git

GitHub recommends a few tools in their Source code migration tools help page.

Warning: there are several "svn2git" tools:

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