The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My work

  • My badges

  • Twitter Updates

    Error: Twitter did not respond. Please wait a few minutes and refresh this page.

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,808 other followers

Git SVN: an easy way to try out Git when your main repository is still SVN (via: XE6 still stuck on an old SVN version…)

Posted by jpluimers on 2015/06/16

Graeme Geldenhuys posted a great comment below.

Summary:

Git can do SVN, so locally you will see it as a Git repository, but the SVN repository will stay “as is” and not be affected neither will other SVN users be affected.

Two of the great benefits of this:

  1. You have fill local history so no need for long server-round trips to access it.
  2. You have the full query featureset of Git at your disposal. Locally.

Combined, you can do these without the need to be online or wait for the SVN connection and transfer:

For instance to view your branches:

git branches -vv

Or to show the branch-history:

git show-branch

It is how I access the FastMM repository from Git and described the git commands on how to get started and keep up to date.

Here is Graeme’s comment:          

+Lars Fosdal

Letting Git manage a SVN repository doesn’t affect the SVN repository at all. Git simply acts as the front end, thus allows you to do local commits and get some but not all of the benefits of Git. After you’ve done all your work and local commits, you then tell Git to commit your changes to the SVN repository. To all other SVN users, it is business as usual. They see your commits just like they normally would have, and will never know you used Git locally. That’s the beautify of this. It allows for a gentle introduction to Git, but without actually converting your repository for SubVersion. A fantastic way to try out git. And if you don’t like it in the end, simply go back to your normal ways of using SVN. Again, the SubVersion repository is NOT affected in any way.

+Jeroen Wiert Pluimers

Yup, ‘git svn clone’ and ‘git svn rebase’ and ‘git svn dcommit’ is what I have been using for years on those repository I can’t move to Git.

And how to clone GExperts in git:

git svn clone https://svn.code.sf.net/p/gexperts/code/trunk GExperts
.

git svn rebase

git push origin

The above git statements operate on the master branch.

–jeroen

via: XE6 still stuck on an old SVN version. We need an easy way to solve this….

PS:

As of Delphi XE7 it can do Git (see Git Integration in AppMethod and RAD Studio XE7 – DelphiFeeds.com and Git Integration in AppMethod and RAD Studio – YouTube).

I doubt the Delphi Git integration  can do Git SVN. Delphi calls Git.exe directly and I could not find how to inject SVN there. But VersionInsight in Delphi still supports SVN natively (not Mercurial/HG, but that’s another story).

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: