简体   繁体   English

我可以复制将整个代码文件夹粘贴到SVN存储库中吗

[英]Can i copy paste the entire code folder in SVN repository

I am building a website and my public_html is under SVN. 我正在建立一个网站,而我的public_html在SVN下。 Now i dont know much about SVN. 现在我对SVN不太了解。

This weekend i copied the whole site to my windows computer and i made few changes to site. 这个周末,我将整个站点复制到了Windows计算机上,并且对该站点进行了一些更改。

I have made changes under SRC directory. 我在SRC目录下进行了更改。

Now can i just copy paste that whole folder in main webiste SRC folder. 现在,我可以将整个文件夹复制粘贴到Webiste主SRC文件夹中。 As that folder is shared on my windows XP , i can just replace that. 由于该文件夹是在Windows XP上共享的,因此我可以替换它。 Or i can remove the old one and replace with this new one. 或者,我可以删除旧的并替换为新的。

I just don't want to break the SVN . 我只是不想破坏SVN。 which method is safe , so that other coders on diff folders don't get affected 哪种方法是安全的,以便diff文件夹上的其他编码器不会受到影响

As long as you do not touch the .svn folder(s) you should be fine. 只要您不触摸.svn文件夹,就可以了。 Copying another file with the same name is just like editing it. 复制具有相同名称的另一个文件就像编辑它一样。 Once you copied the files, you can commit your changes. 复制文件后,即可提交更改。

However: If other people may have made changes, then make sure that you copy your files BEFORE updating from the repository (then the update will try to merge with your changes)! 但是:如果其他人进行了更改,请确保在从存储库更新之前复制文件(然后更新将尝试与您的更改合并)! If you copy your files onto the already updates files, you will overwrite the other peoples changes - effectively undoing them (but you will not notice, because you can commit). 如果将文件复制到已经更新的文件上,则将覆盖其他人的更改-有效地撤消它们(但您不会注意到,因为可以提交)。

Best way is to commit / ci your changes instead of deleting the ones on repository. 最好的方法是commit / ci更改更改,而不是删除存储库中的更改。

Next time you MOVE files, use SVN MOVE command . 下次您移动文件时,请使用SVN MOVE命令。 Also, you might consider updating to Git? 另外,您可能考虑更新到Git?

Here is a link to SVN commands for you to get started :) 这是指向SVN命令的链接,供您入门:)

http://www.linuxfromscratch.org/blfs/edguide/chapter03.html#ch03-introduction http://www.linuxfromscratch.org/blfs/edguide/chapter03.html#ch03-introduction

If you copy & paste you should delete all .svn files and folder in public_html and subdirectories. 如果复制和粘贴,则应删除public_html和子目录中的所有.svn文件和文件夹。

...or you could install an SVN client on the server and run "svn update" (you may want to restrict the .svn files & folders from being accessed by the general public) ...或者您可以在服务器上安装SVN客户端并运行“ svn更新”(您可能希望限制.svn文件和文件夹被公众访问)

The "SVN Way" is do a commit ( svn commit ) of the SRC directory from your Windows computer and then do an update ( svn update ) in the SRC directory inside the server *public_html* directory. “ SVN方式”是从Windows计算机执行SRC目录的提交( svn commit ),然后在服务器* public_html *目录内的SRC目录中执行更新( svn update )。

When you copied the SRC directory you cloned the working copy. 复制SRC目录时,将克隆工作副本。 You can just used them both as normal working copies and use the repository to sync them. 您可以将它们既用作常规工作副本,也可以使用存储库来同步它们。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我可以复制/粘贴Laravel框架文件夹结构吗? - Can I just copy/paste Laravel framework folder structure? 我可以在没有工作副本的情况下使用PHP4与SVN存储库进行交互吗? - Can I use PHP4 to interact with an SVN repository without a working copy? 如何使用远程服务器上的 php 删除本地工作副本上的 hidden.svn 文件夹? Unlink() 权限被拒绝 - How can I delete the hidden .svn folder on my local working copy using php on a remote server? Unlink() permission denied 如何使用PHP将文件存储库复制到新文件夹 - How do I copy files repository to new folder with PHP 如何以编程方式“即时”设置 SVN 存储库? - How can I set up an SVN repository “on the fly” programmatically? 我可以将整个Magento应用程序复制到新服务器吗? - Can I copy an entire Magento application to a new server? 如何使用 Laravel 将文件夹复制到另一个文件夹? - How can I copy a folder to another folder with Laravel? Web开发中的SVN作为基本代码存储库 - SVN in web development as a base code repository Google Sheet API - 如何将整个工作表复制/粘贴到另一个电子表格? - Google Sheet API - How to copy/paste an entire sheet to another spreadsheet? 无法在SVN储存库中运行PHP文件 - Can't run PHP file in SVN repository
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM