Thursday, April 9, 2009

Git-SVN for lazy people

Here's what I think is a minimal set of git-svn commands that are sufficient to work offline with a Subversion repository:

Cloning a copy of the repository

Get your copy with

git svn clone http://my.svn.repository/path -s

The -s indicates a standard trunk/tags/branches layout, otherwise you need to provide --trunk, --tags and --branches to provide your layout.

Committing changes

Commit changes with

git commit -a -v

in the top folder. The -a implicitly adds all files, the -v puts a diff into your commit message editor. Note that there is no "svn" in this command, we are using standard git here.

Fetching upstream changes

This grabs all upstream changes and merges them into your working copy:

git svn fetch && git svn rebase

Pushing your changes

To publish the changes you committed locally do:

git svn dcommit

The "d" in "dcommit" is deliberate. The command pushes all changes you have committed locally back into the original Subversion repository. Your working copy needs to be clean and up-to-date for this to work.

Obviously there is much more you can do, particularly since the local copy is in many ways just a normal git repository. But we wouldn't be lazy if we read about anything more than we need, would we?

1 comment:

vanselowwagener said...

We would possibly permanently block any user who abuses these circumstances. As of June 15, 2022, feedback on are powered by Viafoura, and you may must log in once more to begin commenting. If you need help or are 온라인 카지노 순위 having points together with your commenting account, please email us at We can’t say for positive whether Spin Casino will tick all of the boxes for you. Perhaps the only way to really know for positive is to sign up|to enroll}, claim its welcome bonus a lot as} C$1,000 and 100FS, and discover out.