[英]Simple “Get all new commits from SVN and put them into a true GIT, to 'svn' branch” setup?
這是我第一次嘗試制作git-svn項目。 我有可直接訪問的Debian服務器。
信息: - 本地SVN是一個分支,我不會做任何本地或遠程提交
我要歸檔的內容:
創建真正的GIT本地存儲庫。 這很容易 :-]
http://miranda.googlecode.com/svn/trunk/ (一個分支)創建SVN本地副本(或git-svn repo?我不知道在這種情況下會更好),然后自動獲取所有更改一些檢測遠程更改並在之后運行“svn update”的腳本。
以某種方式從本地SVN repo到本地GIT倉庫以及名為“Miranda-svn”的分支逐一獲取所有“更改”(文件和提交消息)。 因此,當您查看此特定分支的提交/日志時,您將看到與http://code.google.com/p/miranda/source/list相同的消息。
將“Miranda-svn”分支推送到遠程github.com帳戶,項目名稱“Test”,分支名稱“Miranda-svn”
合並分支“Miranda-svn”與“主人”
有人能幫助我嗎? 有這樣設置的一些例子嗎?
Git非常簡單。
首先使用git svn“克隆”遠程存儲庫
git svn init --trunk=trunk http://miranda.googlecode.com/svn miranda
cd miranda
git svn fetch
git checkout -b Miranda-svn remotes/trunk
注意:您可能希望使用-r start:end
開關限制獲取的修訂數
然后為github添加一個新的遙控器
git remote add origin git@github.com:myuser/test.git
最后將更改推送到github遠程
git push origin Miranda-svn
使用SVN中的內容更新Git分支:
git checkout Miranda-svn # Just to be sure that we are on the correct branch
git svn rebase
git push origin Miranda-svn
將SVN更改合並到另一個Git分支:
git checkout master # Or whatever branch you want
git merge --no-ff Miranda-svn
NB! 由於SVN具有線性歷史記錄,並且“svn”分支將在每次“拉動”時重新設置,因此您不希望使用此設置向Miranda-svn分支提交任何內容。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.