{"thread":{"id":"9323","subject":"git-svn and distributed git","startedAt":"2007-07-31T09:42:06Z","lastAt":"2007-07-31T12:31:53Z","messageCount":2,"participants":["Väinö Järvelä"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"49202","messageId":"65B05BC3-2BC2-4451-87C2-940113C55287@pp.inet.fi","threadId":"9323","inReplyTo":null,"subject":"git-svn and distributed git","fromName":"Väinö Järvelä","fromEmail":"v@pp.inet.fi","sentAt":"2007-07-31T09:42:06Z","receivedAt":"2007-07-31T09:42:06Z","isPatch":false,"sender":{"key":"v@pp.inet.fi","avatar":null},"body":"Hello,\n\n\nI have just started using git, so I don't have a lot of experience on  \nit, and I also haven't used it in a distributed environment, just as  \na single developer on one of my personal projects.\n\nNow I'm trying to use git at work through git-svn. git-svn cloned the  \nSubversion repository okay, and using git and dcommitting to  \nSubversion also works fine. The problems started when i tried to use  \nthe git-svn repository in a distributed fashion.\n\n\nHere's the thing: I'm developing a server software, locally and on a  \npre-production server. The pre-production test server (just called  \nthe server for now on) is on a DMZ network, which cannot access our  \nSubversion server. So I thought I could push the git repository to  \nthe server to update the code, which works fine too. But sometimes  \nwhen there is a problem, I'll just develop the fix on the server  \nitself, instead of on my laptop (local development). I would like to  \nbe able to pull the changes made on the server, back to my laptop,  \nand dcommit it to the Subversion server from there.\n\nThe problem is, that git-svn changes all the commits, and pushing to  \nthe server repository won't work anymore. I can force a push, but  \nthen there will be two commits per every commit pulled from the server.\n\nI have thought about using two branches on the server, master, which  \nwill only include commits already processed through git-svn, and dev,  \nwhich is used to pull the \"local\" changes to be committed to  \nSubversion. But my inexperience with git got me here, and I can't  \nseem to be able to get any updates from the other branch. And I'm not  \neven sure if this is the right approach to this problem.\n\n\nWhat kind of approach/workflow would you use in a similar situation?\n\n\nRegards,\nVäinö Järvelä"},{"id":"49220","messageId":"52536EC3-C82C-4919-979A-9DE63BEF8C8C@pp.inet.fi","threadId":"9323","inReplyTo":"65B05BC3-2BC2-4451-87C2-940113C55287@pp.inet.fi","subject":"Re: git-svn and distributed git","fromName":"Väinö Järvelä","fromEmail":"v@pp.inet.fi","sentAt":"2007-07-31T12:31:53Z","receivedAt":"2007-07-31T12:31:53Z","isPatch":false,"sender":{"key":"v@pp.inet.fi","avatar":null},"body":"On Jul 31, 2007, at 12:42, Väinö Järvelä wrote:\n\n> I have thought about using two branches on the server, master,  \n> which will only include commits already processed through git-svn,  \n> and dev, which is used to pull the \"local\" changes to be committed  \n> to Subversion. But my inexperience with git got me here, and I  \n> can't seem to be able to get any updates from the other branch. And  \n> I'm not even sure if this is the right approach to this problem.\n\nI got the branched situation to work. I was just pushing and pulling  \nwrong when it didn't work. I guess I didn't understand the  \ndocumentation well enough to fiddle around with remotes.\n\nI got the branching to work with simple commands:\nserver$ git push origin dev\nlaptop$ git pull server dev\nlaptop$ git-svn dcommit && git push server && git branch -r -d dev\nserver$ git checkout master && git pull origin && git branch -D dev\n\nBut that's a lot of commands, am I still missing something with the  \nbranching?\n\n\nRegards,\nVäinö"}]}