想在TortoiseHG/Mercurial中为我的.hgignore文件创建一些默认设置 [英] Would like to create some defaults for my .hgignore files in TortoiseHG/Mercurial

查看:79
本文介绍了想在TortoiseHG/Mercurial中为我的.hgignore文件创建一些默认设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想这样做,以便每次创建新存储库时,默认情况下都会自动将某些过滤器添加到我的.hgignore文件中.

I'd like to make it so that every time I create a new repository, certain filters automatically get added to my .hgignore files by default.

例如,对于C#项目,我希望添加这些内容:

For example, for C# projects, I would like these to be added:

glob:bin/*
glob:obj/*

这可能吗?怎么样?

如果无法自动化,将.hgignore文件从一个存储库复制到另一个存储库至少安全吗?

If it can't be automated, is it at least safe to copy the .hgignore file from one repository to another?

推荐答案

我使用〜/.hgignore,然后将其cp到我的仓库中.

I use ~/.hgignore and just cp that into my repo.

在我的〜/.hgrc中:

In my ~/.hgrc:

[ui]
ignore.other = ~/.hgignore

我只是将非常明显的内容放入其中.并复制它以用于项目特定的内容.

I just put the really obvious stuff in that one. And copy it for project specific stuff.

由于没有自动化,我认为它不是您所要的,但是它可以解决问题.

I don't think its quite what you're asking for as there is no automation, but it does the trick.

Windows用户,请参见下面的Ry4an评论.

Windows users, see Ry4an's comment below.

这篇关于想在TortoiseHG/Mercurial中为我的.hgignore文件创建一些默认设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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