如何忽略文件夹而不将其从我的存储库中删除 [英] How to ignore folder without removing it from my repository

查看:39
本文介绍了如何忽略文件夹而不将其从我的存储库中删除的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这个 tmp/和 cache/目录,它们不断生成不需要提交的文件.

I have this tmp/ and cache/ directories, that keep generating files that don't need to be commited.

我如何设置它以便 svn 忽略它们,但不会删除它们或从存储库中删除它们,站点需要它们才能工作.

How can I set it so svn ignores them, but doesn't delete them or remove them from the repository, they are needed for the site to work.

推荐答案

$ cd /path/to/app/tmp
$ svn propset svn:ignore '*' .
$ cd /path/to/app/cache
$ svn propset svn:ignore '*' .

如果您之前已经提交过,这里是步骤

Here's the steps if you already previously committed

$ cd /path/to/app/tmp
$ svn st
M slkdjfag.jpg
M gasgsag.png
. #bunch of M's

$ svn rm * --force
$ svn ci -m'trunk: cleaning up tmp directory'
$ svn propset svn:ignore '*' .
$ touch a
$ svn st // shouldn't output anything

这篇关于如何忽略文件夹而不将其从我的存储库中删除的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆