Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I use "git-svn" to checkout a local svn repository?

Tags:

git

svn

git-svn

I'm practicing how to use svn and git.

I created a svn repository on my computer, at "/Users/name/svnRepo/test". I am able to use the svn commands to work on this repository.

Then, I tried to use command "git-svn clone FILE:///Users/name/svnRepo/test/ .", and got an error:

Initialized empty Git repository in ... Bad URL passed to RA layer: Unable to open an ra_local session to URL: Local URL 'FILE:///Users/name/svnRepo/test' does not contain 'file://' prefix at /usr/local/git/libexec/git-core/git-svn line 1775

Could anyone help?

like image 319
Vicky Avatar asked Mar 04 '11 19:03

Vicky


People also ask

Can I use Git for SVN repository?

Use git-svn, it is really simple. First clone your repository with git svn clone then you can git svn dcommit your work or git svn rebase it on the latest changes. Make sure your history is always linear by always rebasing your local branches on master so that you can merge them with git merge --ff-only .

How do you SVN checkout a folder?

Open the Repository Browser: Right-Mouse Button (RMB) on the newly created folder ==> TortoiseSVN ==> Repo-browser (or immediately Update to revision on a subfolder). Navigate to the folder you want to checkout completely. Press RMB on that subfolder, and select 'Update item to revision'. Press OK.


1 Answers

Scheme part of URL is case-sensitive. Try to use "git-svn clone file:///Users/name/svnRepo/test/ ." command.

like image 73
Ivan Zhakov Avatar answered Sep 21 '22 09:09

Ivan Zhakov