Did you know you can access GitHub via SVN? While preparing my 1st Legacy Code Retreat, I was looking for a way to checkout a subfolder of a GitHub repository, when I stumbled across a post on StackOverflow.
For example, I can checkout only the “src” folder of my “foo” repository by:
# Web URL: https://github.com/letsdeveloper/Lets-Refactor-MovieRental/tree/master/src $> svn checkout https://github.com/letsdeveloper/foo/trunk/src
This will checkout the master-branch version. To checkout another branch’s version I can use
$> svn checkout https://github.com/letsdeveloper/foo/branches/<branchname>/src
The same principle works for tags
$> svn checkout https://github.com/letsdeveloper/foo/tags/<tagname>/src
GitHub’s API seems to support all SVN commands, including list
, checkout
, commit
, and export
.
Share this: | Follow me: