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

北城余情 提交于 2019-11-28 13:46:13

问题


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.


回答1:


Just add a . to it:

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

That means: check out to current directory.




回答2:


svn co svn://path destination

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

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



回答3:


Just add the directory on the command line:

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



回答4:


Provide the directory on the command line:

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


来源:https://stackoverflow.com/questions/927806/svn-checkout-the-contents-of-a-folder-not-the-folder-itself

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!