i have to use a subversion repository and i'd like to use git-svn. I switch the computer sometimes and at the moment 开发者_开发百科i need to commit my changes and update the other computer. Sometimes the changed code wouldn't work, so my idea would be to create two git-svn repos and synchronize them with push/pull, and sometimes sync them (or one of them) with the svn repository. Would that be possible? Switching the repository to git is no option. (Sadly)
If you need to sync with SVN your Git repo from both of your computer, then yes: each repo will be a "git-svn" one.
You create 2 repos, and then create your own set of git branches on top of the git-svn ones.
But you must not merge/push/pull any branch that will be dcommit'ed back to SVN: You need to pay attention to the CAVEATS section of git-svn:
For the sake of simplicity and interoperating with Subversion, it is recommended that all
git svnusersclone,fetchanddcommitdirectly from the SVN server, and avoid all gitclone/pull/merge/pushoperations between git repositories and branches. The recommended method of exchanging code between git branches and users is git format-patch and git am, or just 'dcommit’ing to the SVN repository.Running
git mergeorgit pullis NOT recommended on a branch you plan todcommitfrom because Subversion users cannot see any merges you’ve made. Furthermore, if youmergeorpullfrom a git branch that is a mirror of an SVN branch,dcommitmay commit to the wrong branch.
I would say rsync the two repos across the two machines. You would have the same repo.
加载中,请稍侯......
精彩评论