簡體   English   中英

如何將本地svn工作目錄克隆到git repo並上傳到github?

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

任務是從本地svn工作目錄遷移到git存儲庫並上傳到遠程github。

系統:Windows 10 64位

git-svn版本:2.21.0.windows.1(svn 1.9.7)

1-我安裝了TortoiseGit並嘗試應用git clone命令並使用以下命令提供源以指向github網址

用戶名:tokem@github.company.com/repo.git

我收到此錯誤:“使用現有的[svn-remote“ svn”] svn-remote.svn.fetch已設置為跟蹤:refs / remotes / git-svn”

2-使用GitBatch運行:

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

我正確地獲得了authors.txt,然后運行:

git config --global --unset http.proxy 

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

我遇到了同樣的錯誤:git-svn windows使用現有的[svn-remote“ svn”] svn-remote.svn.fetch已設置為跟蹤:refs / remotes / git-svn

到目前為止,我無法將本地svn克隆到git,然后再上傳到github,請幫助

我閱讀了git-svn文檔並閱讀了svn2git工具指南,但無濟於事!

預先感謝,瑪麗亞姆

如果您要在git和svn之間進行推/拉提交,則git-svn更適合。 對於直接導出, svn2git是一個更好的解決方案,並且速度更快。
https://github.com/svn-all-fast-export/svn2git

GitHub在其源代碼遷移工具幫助頁面中推薦了一些工具。

警告:有幾種“ svn2git”工具:

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM