hg本地忽略 [英] hg local ignore

查看:75
本文介绍了hg本地忽略的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可能发誓有一种方法可以将本地忽略文件保存在hg仓库中,即功能类似于.hgignore的文件,但是没有签入仓库.例如,如果使用不同的IDE,则可以使用它忽略对IDE项目文件的更改.我在寻找完成方式时遇到了麻烦.有人记得细节吗?

I could have sworn there was a way to keep a local ignore file in an hg repo, i.e. a file similar in function to .hgignore, but not checked into the repo. This could be used to ignore changes to an IDE project file if different IDEs are being used, for example. I'm having trouble finding how it's done. Does anyone recall the details?

推荐答案

是我一直在寻找的东西.

This is what I was looking for.

将以下内容添加到存储库的.hg/hgrc中:

Add the following to the repo's .hg/hgrc:

[ui]
ignore = /path/to/repo/.hg/hgignore

并在其旁边创建一个新文件.hg/hgignore.这个新文件将是 未跟踪,但与此版本的.hgignore文件相同 具体的工作副本. (/path/to/repo位是不幸的,但是 从子目录的子目录中调用"hg"时使它工作的必要条件 回购.)

and create a new file .hg/hgignore beside it. This new file will be untracked, but work the same as the versioned .hgignore file for this specific working copy. (The /path/to/repo bit is unfortunate but necessary to make it work when invoking 'hg' from within a subdir of the repo.)

这篇关于hg本地忽略的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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