Skip to content

Improved Subversion Client Support

About a year and a half ago we announced SVN client support, which could be used for limited access to GitHub repositories from Subversion clients. Today we're launching new, improved…

Author

About a year and a half ago we announced SVN client support, which could be used for limited access to GitHub repositories from Subversion clients.

Today we’re launching new, improved SVN support.

What’s New?

The URL

No need to use svn.github.com anymore, now your svn client can use the
same URL as your git client. Repositories can still be accessed using the old URLs at https://svn.github.com/ but
everyone should migrate as we’ll be turning off svn.github.com soon.

$ git clone https://github.com/nickh/dynashard git-ds
Cloning into git-ds...
remote: Counting objects: 135, done.
remote: Compressing objects: 100% (71/71), done.
remote: Total 135 (delta 65), reused 128 (delta 58)
Receiving objects: 100% (135/135), 31.19 KiB, done.
Resolving deltas: 100% (65/65), done.

$ svn checkout https://github.com/nickh/dynashard svn-ds
A    svn-ds/branches
A    svn-ds/branches/shard_names
A    svn-ds/branches/shard_names/.document
A    svn-ds/branches/shard_names/.gitignore
...
A    svn-ds/trunk/spec/support
A    svn-ds/trunk/spec/support/factories.rb
A    svn-ds/trunk/spec/support/models.rb
Checked out revision 25.

Branches

Repos are mapped to a standard subversion layout, with your master
branch in trunk/ and the rest of your branches in branches/

$ git ls-remote --heads origin
7523fabdfea89c38b10afde0ec2f07095de8c9a2    refs/heads/master
2ed6303f260abe2bd76d231fe173aeef833b1c9e    refs/heads/shard_names

$ svn ls
branches/
trunk/

$ svn ls trunk
.document
.gitignore
...
dynashard.gemspec
lib/
spec/

$ svn ls branches
shard_names/

Partial Checkouts

Checkout and update only the parts of the repo you
need to work on.

$ svn co -N https://github.com/nickh/dynashard svn-ds
Checked out revision 25.

$ svn up -N branches
A    branches
Updated to revision 25.

$ svn up trunk
A    trunk
A    trunk/.document
A    trunk/.gitignore
...
A    trunk/spec/support
A    trunk/spec/support/factories.rb
A    trunk/spec/support/models.rb
Updated to revision 25.

Commits

Edit files, create branches, and push your changes.

$ svn cp trunk branches/wip
$ svn commit -m 'Created a topic branch'
Adding         branches/wip
Committed revision 26.

$ git ls-remote --heads origin
7523fabdfea89c38b10afde0ec2f07095de8c9a2    refs/heads/master
2ed6303f260abe2bd76d231fe173aeef833b1c9e    refs/heads/shard_names
7523fabdfea89c38b10afde0ec2f07095de8c9a2    refs/heads/wip

$ echo '# Important change' >> branches/wip/README.md
$ svn commit -m 'Made an important change'
Sending        branches/wip/README.md
Transmitting file data .
Committed revision 27.

What’s Next?

We’ll continue to improve Subversion integration so mixed teams can more easily
work together. Upcoming changes include:

  • branch merging and rebasing
  • better mapping of Subversion <=> GitHub user names in commits
  • annotate/blame support
  • allow trunk to be mapped to a branch other than ‘master’

Update: trunk now maps to the repo’s HEAD ref (usually master), and tags are now supported.

Explore more from GitHub

Product

Product

Updates on GitHub products and features, hot off the press.
GitHub Universe 2024

GitHub Universe 2024

Get tickets to the 10th anniversary of our global developer event on AI, DevEx, and security.
GitHub Copilot

GitHub Copilot

Don't fly solo. Try 30 days for free.
Work at GitHub!

Work at GitHub!

Check out our current job openings.