我已經用git-svn克隆了一個完整的std-layout subversion版本庫。我的混帳配置定義爲:合併並推送所有git分支
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[svn-remote "svn"]
url = https://firebird.svn.sourceforge.net/svnroot/firebird
fetch = firebird/trunk:refs/remotes/trunk
branches = firebird/branches/*:refs/remotes/*
tags = firebird/tags/*:refs/remotes/tags/*
[remote "origin"]
url = [email protected]:asfernandes/firebird.git
fetch = +refs/heads/*:refs/remotes/origin/*
fetch = +refs/tags/*:refs/tags/*
push = +refs/heads/*:refs/heads/*
push = +refs/tags/*:refs/tags/*
我推着所有分支這個github上與下面的bash腳本。我有本地分支機構跟蹤遠程分支機構。
#!/bin/sh
git svn fetch
for x in `echo B1_5_Release B2_0_Release B2_1_Release B2_5_Release`; do git reset --hard; git checkout $x; git merge remotes/$x; done
git push --all
是不是有更好的方法來做到這一點,而不檢查和合並每個分支?
更好的是,如果我可以直接推動沒有本地分支的git-svn遠程分支。
謝謝,這似乎工作正常! – 2010-12-23 21:16:28