My company uses Subversion; I prefer Git. I have cloned the Subversion repository on my work machine using git-svn and am relatively comfortable using Git as a Subversion client. Now I would like to take the arrangement a step further and leverage the decentralized nature of Git to be able to work on this project from outside the office. Ideally, I would like to mirror all change to my local (office) working copy to my Github account and also the reverse – have all changes to my Github repository made while out of the office be synced/pushed/mirrored to the working copy on my work machine (which is the cloned Subversion repository). Is this possible? How would I begin? Is there another arrangement which will allow me to work away from the office yet still have the working copy at the office be my primary workspace?
My company uses Subversion; I prefer Git. I have cloned the Subversion repository on
Share
Yes, git-svn supports all these workflows. I’m not sure about how it works if you started out by cloning, but if you do your first checkout of code using
git will both create a git repository and store necessary SVN information.
You should check out the command
It allows you to push to an SVN repository the same way you would push to a git repository on github. To get changes, try
If you run
you’ll see a list of branches, which includes SVN codelines. If you are used to merging code to master before pushing, you want to make sure you merge to the “trunk” branch as one would in SVN, but other than that is the same as using git.