Linux SVN签出文件夹的内容,而不是文件夹本身

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/927806/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-03 17:21:26  来源:igfitidea点击:

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

linuxsvnsvn-checkout

提问by

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):

我对 linux 和 svn 相当陌生。我正在尝试使用此命令(在 public_html 中)将项目的主干文件夹签出到我的 public_html 目录中:

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

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

waterproject 目录包含解压缩 drupal 基本安装的文件。

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

它检查得很好,除了所有文件都在public_html/trunk而不只是在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.

我不知道将 trunk 的所有内容移动到 public_html 和 rm trunk 的命令,但我想我可以相对容易地弄清楚。我只想知道我是否可以只查看文件夹的内容,而无需查看文件夹本身。

采纳答案by Sander Marechal

Just add a .to it:

只需添加一个.

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

That means: check out to current directory.

这意味着:签出到当前目录。

回答by allaryin

svn co svn://path destination

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

要指定当前目录,请使用“.”。对于您的目标目录:

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

回答by allaryin

Provide the directory on the command line:

在命令行中提供目录:

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

回答by Iyngaran Iyathurai

Just add the directory on the command line:

只需在命令行中添加目录:

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