English 中文(简体)
是否有办法选择我想要的东西,不要忽视我不想做什么。
原标题:Is there a way to select what I want in hg, not ignore what I don t want

我知道 汞的忽视是有用的,但我可以说明我所关心的是哪些档案,而只是忽视其他档案,例如。

如果我有<条码>a.c, a.h, a.o, a.exe, a.err in the repo,那么我就能够讲一句话。 汞问题,我只想保留*.c*.h,而只是无视名单上的所有内容。

最佳回答

Heh, @vonC是正确的,我不能让它来。 没有什么办法将黑手提变成一个白人名单,而不是一个黑名单。 我以设计的方式收集了这一信息(我当然没有这样做)。

你有几种选择:

  1. <everything (.*)至.hgignore, 之后hg 加入 , 您希望得到跟踪—— 添加始终无视的绝对原则

  2. 仅打碎和打上适当的黑名单:hg status——no-status——un known >>hgignore是一个很大的起点。

The bottom line is accidentally tracking something you didn t want tracked is less dangerous a situation than accidentally forgetting to track something you wished was tracked. The former creates a little noise in the your repo, while the latter results in potential data loss.

如果你真心希望获得活力,请在<条码>上添加<>>>*。

[hooks]
precommit.add = hg add $(hg status --unknown --no-status -I  **.c  -I  **.h )

which would automatically add any new .c and .h files when you commit.

问题回答

暂无回答




相关问题
Tracking Versions, Builds, Revisions, with TortiseSVN

I am the sole developer on a project and have been using tortoiseSVN for quite a while. Now Id like to start getting version information working correctly in the project I.E. show Major Version, Minor ...

Tips on upgrading CVS to git/hg?

We still use CVS, I use git and hg for my personal use though I m still a novice at both, but I realize they re much more modern and better, faster, distributed, etc. It s just everyone is so ...

How to handle different csproj [closed]

I am working in a team of five. We are working on a C# application with five csprojects. The problem is that for each csproject, each of my colleagues has their own ideas on how to reference a DLL; ...

Changing username in SVN+SSH URI on the fly in working copy

I am using SVN+SSH to check out a working copy of repository from an SVN server on which all developers are members of a developer group and have full read/write permissions on the repository ...

How to search for file in subversion server?

Is there a way to search for a file in a subversion repository? Something similar to Unix find command, with which I can find the location of a file in a repository. I know there is svn list, but ...

热门标签