Import into Subversion
February 1, 2009 3:09 PM Subscribe
How do I import a single file with Subversion?
Sometimes it's convenient to use Subversion without doing a full-blown checkout and creating a .svn file and all that. For example, I can successfully export a single file as follows:
svn export http://blahblah.cvsdude.com/repo/somefile.c
which simply grabs a copy of somefile.c without any fuss. I'd like to do the same, in reverse. I tried
svn import -m "comment" otherfile.c http://blahblah.cvsdude.com/repo
but I get the error
svn: Path 'http://blahblah.cvsdude.com/repo' already exists
which means I'm confused, because my reaction is "Of course it already exists!"
Help please.
Sometimes it's convenient to use Subversion without doing a full-blown checkout and creating a .svn file and all that. For example, I can successfully export a single file as follows:
svn export http://blahblah.cvsdude.com/repo/somefile.c
which simply grabs a copy of somefile.c without any fuss. I'd like to do the same, in reverse. I tried
svn import -m "comment" otherfile.c http://blahblah.cvsdude.com/repo
but I get the error
svn: Path 'http://blahblah.cvsdude.com/repo' already exists
which means I'm confused, because my reaction is "Of course it already exists!"
Help please.
Response by poster: Works! Thanks.
Didn't occur to me that I needed to give the destination file name.
posted by iconjack at 3:22 PM on February 1, 2009
Didn't occur to me that I needed to give the destination file name.
posted by iconjack at 3:22 PM on February 1, 2009
Also if you're trying to do that kind of thing, I really suggest that you use git. It's a lot lower friction than svn.
posted by singingfish at 12:13 AM on February 2, 2009
posted by singingfish at 12:13 AM on February 2, 2009
This thread is closed to new comments.
svn import -m "comment" otherfile.c http://blahblah.cvsdude.com/repo/otherfile.c
posted by ooga_booga at 3:15 PM on February 1, 2009