Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/svn/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Svn 提交单个文件而不使用工作副本_Svn - Fatal编程技术网

Svn 提交单个文件而不使用工作副本

Svn 提交单个文件而不使用工作副本,svn,Svn,我在存储库中有一个文件,我想提交该文件的新版本 有没有一种方法可以在不签出存储库或该文件的文件夹的情况下实现这一点(我想要类似于SVN导入的东西,但要覆盖现有文件,并且不丢失文件的历史记录) 有办法吗?您只需签出文件所在的目录即可。然后将文件的修改版本复制到该目录中,然后从该目录上载该文件,如: svn checkout repo-url target-dir --depth empty cd target-dir cp /whatever/changed-file . svn up chang

我在存储库中有一个文件,我想提交该文件的新版本

有没有一种方法可以在不签出存储库或该文件的文件夹的情况下实现这一点(我想要类似于SVN导入的东西,但要覆盖现有文件,并且不丢失文件的历史记录)


有办法吗?

您只需签出文件所在的目录即可。然后将文件的修改版本复制到该目录中,然后从该目录上载该文件,如:

svn checkout repo-url target-dir --depth empty
cd target-dir
cp /whatever/changed-file .
svn up changed-file

谢谢,我会试试看,如果有用的话,把这个作为答案。我的SVN技能有点生疏,但我希望它对你有用。