git-svn clone fails “fatal: Not a valid object name”

The tag on SVN has a space in it, but the tag in git had this space converted to %20 (URL encoded). To solve it just manually add a new tag with the verbatim name:

cd .git/refs/remotes/tags/
mv Sync%20Controllers Sync\ Controllers

Then run the git svn clone command again.

(Normally you’d do this with git tag OLDTAG NEWTAG but git was not allowing me to define a tag with a space in. The tag files are simply text files containing the hash of the relevant commit.)

Leave a Comment