How to use SVN (Subversion) on Google Code hosting

Google has generously offered free hosting services for free open source developers to host their projects either by using Mercurial, Subversion or git.

This blog post touches on the basic on to use SVN to maintain source code repository on Google Code Hosting.

This tutorial assume that you have :

  • Created an open source project on Google Code
  • Installed subversion on your GNU/Linux operating system
  • Have source code to import

Initial Import
You must perform initial check-in in order to use the SVN repository. To do that, you must go to your Google Code project, as shown in the screenshot.

subversion svn

From bash terminal, to import your project into Google Code, type:

svn import /path-to/src/ --username -m "initial import"

You'll be prompted to enter password, which you can generate from your Google project page

SVN commit
After initial import, your source code will be made available from Google Code hosting for public access.

You may 'commit' after you've made revision or alteration into the source code. to "commit" type:
svn commit -m "added new TextField to user-interface"

the -m specifies change log, you shouldn't commit without a proper log message as this will help other users to track the changes that you've made with your source code.

SVN add: For adding new source files
If you add new files to your source code, just type:
svn add <filename>

You may then proceed with "svn commit" to add the file to the repository server.

Recursively add unversioned files into SVN repository
If you've added several new files into source code working copy, these file will be unversioned and thus won't be committed to the subversion server.

You can use this command recursively add new unversioned files to svn repository.


svn status | perl -ne 's/^\?\s+(\S.+)$/\1/g;chomp;system("svn add \"$_\"");'


**taken from

Google Code Hosting now supports Git!

Great news to all developers out there! Google Code hosting service now supports Git in addition to Subversion (SVN) and Mercurial. Probably the top Google Code wishlish, I’m sure open source developers appreciates Google decision to offer Git support on its free open source code hosting service.

New and existing projects may continue to use SVN and Mercurial as version control and those who wished to switch to Git may do so from the “Administer” option in the Google Code Project Dashboard

Some note about Google Code Git support:

  • Requires at least Git 1.6.6
  • Repo size limit 4GiB
  • Push pack limit of 500 MiB (soon to be lifted)
Google Code Git

For more information about Git support in Google Code, please read: Google Code Git FAQ