You've got a lot of Gal

Yet another blog about Ruby, Rails, Javascript, Apple, Malteses and Shih-Tzus by Gal Steinitz

This site is completely static. It was last generated with Octopress and Jekyll on Sep 02, 2013 and hosted on github pages.

SVN: Full Text Search for a Specific String in a Commit

As a long time git user, I expected it to be easy to do a full text search in SVN for a specific string in all commits. Apparently, it is not! However…fret not git users! Since we’re all so much more used to using Git, you might as well use the git-svn gateway for the project.

This will allow you to use all the git commands you’re used to, while actually pushing to an svn remote. It’s bidirectional, and you can keep working this way indefinitely - while the rest of your team mates will continue to use SVN and will not be the wiser! Whats more - you now have the advantage of a distributed source control system, while not actually using one. You can commit your code locally to your hearts content and only push it to the remote when you’re ready.

First, clone the repo into a new folder:

1
git svn clone http://path/to/your/svn/repo

Next, use the built in git -S option to do a full text search. This will show you every commit where this string was added or removed from any file. The -u option makes it so that the full diff of each commit is displayed, and not just the commit message.

1
git log -S"the-string-you-want-to-find" -u

The real answer? Start actually using git! Git Crash Course for SVN Users

Comments