svn:哪些文件将提交 - 如何忽略它们
我从 svn status 得到以下输出
$ svn status
M .
? tmp
M cron
M cron/alerts.php
M Impact.php
M logs
M conf
M conf/db.ini <-- Let's talk about this file
M conf/impact.xml
在我的本地工作副本中,我修改了conf/db.ini 文件以连接到我的开发数据库服务器。由于这些更改是特定于我的,因此我不希望它们在提交时返回到存储库。
我已经完成了 svn propedit svn:ignore conf
并列出了 db.ini
,但是在执行 svn status
时,我看到该文件仍然有一个第一列中的“M”
,让我认为它仍然会被提交。我在这里说得对吗?如果是这样,我需要做什么才能避免将本地更改提交到该文件?
I've got the following output from svn status
$ svn status
M .
? tmp
M cron
M cron/alerts.php
M Impact.php
M logs
M conf
M conf/db.ini <-- Let's talk about this file
M conf/impact.xml
In my local working copy, I've modified the conf/db.ini
file to connect to my dev DB server. Since these changes are specific to me, I don't want them to go back up to the repository when I commit.
I've done svn propedit svn:ignore conf
and listed db.ini
, but when doing an svn status
I see that file still has an "M"
in the first column, making me think that it will still be committed. Am I correct here? If so, what do I need to do to avoid committing my local changes to that file?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
进一步观察,我还发现您可以 手动创建更改列表,并将要提交的文件添加到更改列表中(当您更改时效果很好,例如 5 个文件,但只想将更改提交到其中 3 个)。当您提交时,您只需指定自定义创建的变更列表的名称即可提交,然后就完成了。
所以,就我而言。如果我只想提交对“Impact.php”的更改,我可以执行以下操作:
In looking a little further, I've also found that you can manually create a changelist, and add the files you want to commit to the change list (works well when you change, say 5 files, but only want to commit the changes to 3 of them). When you commit, you simply commit specifying the name of the custom-created changelist, and you're done.
So, in my case. If I wanted to commit ONLY the changes to 'Impact.php' I could do the following:
我的猜测是您已将 db.ini 文件添加到存储库中,否则它会显示 ?旁边的不是 M。所以,尝试备份您的 db.ini,将其从 SVN 存储库中删除,然后尝试 svnstatus
My guess is that you have added the db.ini file to the repo, else it would have shown a ? next to it and not a M. So, try backing up your db.ini, remove it from the SVN repo and then try svnstatus