(Photo credit by Crystalline Radical)
Nowadays, while most people in our industry know about DVCS tools, such as Git and Mercurial, and what they can do, not all are aware that git can be used with SVN. It is, of course, quite a shame as on top of being the best way to learn how to use git – this feature also enables one to use all the nice tricks of DVCS (offline commit, local history rewriting, commit search, bisect…) while still being stuck with a remote SVN server…
Some years ago, I had already done a quick overview of this feature in my personal blog, so I decided to update and move content here – especially, as I’ve, even recently, run into fellow Red Hatters who did not know about it also !
This HowTo was, and still is, driven by uses cases, which is a good thing because most of those use cases match what any developer do on a daily basis with SVN. Hopefully, this will help readers relate to the tool, but will also make this blog entry a nifty reference page for later on. (In this regard, the DZone Refcardz on Git will also be an excellent reference material).
As for SVN, the very first step one will do with git-svn, is to get the sources from the remote server. If with SVN, one only checks out the latest version of the source code – hence calling this step a checkout, with a DVCS one retrieves the entire project history. Therefore, this step is no longer called a checkout but a clone.
Continue reading “Using Git with SVN”