SVN checkout the contents of a folder, not the folder itself

LinuxSvnSvn Checkout

Linux Problem Overview


I'm fairly new to linux and svn. I'm trying to checkout the trunk folder of a project into my public_html directory using this command (while in public_html):

svn checkout file:///home/landonwinters/svn/waterproject/trunk

The waterproject directory contains the files from untarring a base install of drupal.

It checks out fine, except all the files are in public_html/trunk instead of just being in public_html.

I don't know the command to move all the contents of trunk up to public_html and rm trunk, but I think I could figure that out relatively easily. I just want to know if I can just check out the contents of a folder, without the folder itself.

Linux Solutions


Solution 1 - Linux

Just add a . to it:

svn checkout file:///home/landonwinters/svn/waterproject/trunk .

That means: check out to current directory.

Solution 2 - Linux

svn co svn://path destination

To specify current directory, use a "." for your destination directory:

svn checkout file:///home/landonwinters/svn/waterproject/trunk .

Solution 3 - Linux

Provide the directory on the command line:

svn checkout file:///home/landonwinters/svn/waterproject/trunk public_html

Solution 4 - Linux

Just add the directory on the command line:

svn checkout svn://192.168.1.1/projectname/ target-directory/

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionuser114518View Question on Stackoverflow
Solution 1 - LinuxSander MarechalView Answer on Stackoverflow
Solution 2 - LinuxallaryinView Answer on Stackoverflow
Solution 3 - LinuxanonView Answer on Stackoverflow
Solution 4 - LinuxIyngaran IyathuraiView Answer on Stackoverflow