Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using git and svn with multiple developers

I have a svn repository (with no TLB structure if it matters) which I want to use along with git. I can do a git-svn clone, work on my changes in the git repo and commit back to the svn repo whenever I am done. It's clear until this point.

I'm not sure how to extend this workflow model to multiple developers. I need my dev team to be able to work on a single git repo (the one cloned from the svn repo) which should behave like a normal git repo for all of us. At some point, any developer must be able to commit back to the svn repo. Is this possible? Thanks.

like image 907
Vijay Dev Avatar asked Nov 05 '22 11:11

Vijay Dev


1 Answers

We had the same problem and we didn't find a way to do it, so we switch to full git. Things work fine if only one repo communicate with svn, but otherwise that's getting messy really quicly. What happend is the git-svn branch has its own life

You could just try this
- create to repo git1 and git2 from svn.
- make a change in git 1 and dcommit to svn
- pull it int git2, do a git svn rebase and see what's going on ...

when you try to pull it in git2, you have to kind of create a new branch which start from the svn one , but it's not tracking it. So git2 has basically 2 branch the svn one and the git1. So before being able to push anything from git2 into svn you have to merge firs the git1 branch to the svn one (even if they are identical). (I might be wrong because I have done that a while ago and maybe there is a solution)

Anyway, I had to do it a couple of times because when we switched from 'git-svn' to 'git', we created the central git-repository before everybody finish to dcommit their own thing to svn. I had then to pick new stuff from svn to put them back in the new git repo and that was really a big mess.

So either use only git, or have only one repo connected to svn.

like image 127
mb14 Avatar answered Nov 15 '22 06:11

mb14