git-svn FTW!!1

xsawyerx on 2009-09-14T08:47:31

Google Code uses Subversion. If you do not have a commit bit to a project, you can use the readonly mode and check it out.

However, since it's Subversion, you cannot commit anything under readonly. So, yeah, I guess you create a patch from a diff and send it to the developer. However, if you do a lot of changes, you have to create patches against the older versions of changes you've already made.

For example: I got A from Subversion readonly. I made changes and now have B. I can't commit B so I create a patch from the diff (B.patch) send send it to the developer. Meanwhile, I've made more changes (now it's C) and I want to send it to the developer. I need to create a diff now between B and C. I need to create a copy of the code at every stage to create patches between the different stages. Err.. isn't that why we have SCMs in the first place? I haven't even begun on other issues like making my changes on top of more changes the developer put in between my work.

Git allows me to create a local repo that has access to an SVN path to pull from or push changes to. I just use git-svn and then once I have a commit bit, I can push (or dcommit in git-svn-speak).

That way I fetch the readonly using git-svn, commit commit commit, then when I have a commit bit I can update the Subversion repo with all my commits, or even rebase my code to be the latest after pulling more recent changes from the Subversion repo.