简体   繁体   English

设置要忽略的文件夹,我必须提交此更改/修改吗?

[英]Setting a folder to be ignored, must I commit this change/modification?

Sorry, this is probably a daft question, but I am having a slow day. 抱歉,这可能是一个愚蠢的问题,但是我今天过得很慢。

I have a folder: 我有一个文件夹:

wp-content/uploads/

I would like all files and folders within /uploads/ to be ignored by svn. 我希望svn忽略/ uploads /中的所有文件和文件夹。 But I don't want them to be deleted as they are needed for the website to work. 但是我不希望删除它们,因为网站正常工作需要它们。

The contents of /uploads/ were not in version control, ie they were not checked in so I did the following in the terminal: / uploads /的内容不在版本控制中,即未检入,因此我在终端中进行了以下操作:

$ cd /wp-content/uploads/
$ svn propset svn:ignore '*'  .

So now when I check the status of svn using svn status I get the following: 所以现在当我使用svn status检查svn status我得到以下信息:

M     wp-content/uploads

So now my question, since it says "M", do I need to commit wp-content/uploads ? 所以现在我的问题,因为它说“ M”,我是否需要提交wp-content / uploads?

If I do, will it commit the actual folder contents or simply the property that has been set? 如果我这样做,它将提交实际的文件夹内容还是只是提交已设置的属性 I don't want the contents to be committed. 我不想提交内容。 But committing the property would make sense. 但是,提交财产是有道理的。

At this point I am just unsure about what exactly will be committed if I do svn commit /wp-contents/uploads/ 在这一点上,我只是不确定如果我执行svn commit /wp-contents/uploads/

Yes, you must to commit your modified Working Copy (modified because changing properties also is part of history, which SVN-repository have to save and manage) 是的,您必须提交修改后的工作副本(已修改,因为更改属性也是历史的一部分,SVN存储库必须保存和管理该历史)

If content of /wp-contents/uploads/ was not added to SVN (and files was shown with '?' status before), then now , even before committing changed property, all ? 如果未将/wp-contents/uploads/添加到SVN中(并且文件之前显示为“?”状态),则现在 ,甚至在提交更改的属性之前,所有? must just disappear from svn status and files (exising and will added later) become "invisible" to SVN 必须仅从svn status消失,并且文件(存在并且稍后添加)对于SVN变为“不可见”

svn commit /wp-contents/uploads/ will commit ( as intended ) only property-change for versioned folder (properties are the same first-class citizens for SVN as files and folders) svn commit /wp-contents/uploads/将仅( 按预期 )提交版本文件夹的属性更改(属性与文件和文件夹是SVN的一等公民)

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM