Mercurial 有相当于 git clean 的东西吗?
hg clean 似乎不存在,这有点困扰我。这是 Mercurial 没有的功能还是他们只是以不同的方式命名?
hg clean does not seem to exist, which kinda bothers me. Is this a feature that Mercurial doesn't have or did they just name it differently?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
Mercurial 核心包中没有与 git clean 等效的东西。
但是,
hg purge
扩展可以满足您的需求。有一个 未解决的问题 使此扩展成为核心包的一部分。
There is no equivalent to
git clean
in the core Mercurial package.However, the
hg purge
extension does what you are after.There is an open issue to make this extension part of the core package.
该扩展已包含在 Mercurial 中,但您仍然需要激活它。
它就像在主目录中创建一个 .hgrc 文件一样简单(例如 Win 7:
C:\Users\«yourusername»\.hgrc
)并将以下内容添加到该文件中:(主目录是
~/.hgrc
适用于大多数其他桌面操作系统(Unix、Gnu/Linux、Mac osx、BSD 等)The extension is already included in mercurial, but you still have to activate it.
It's as simple as creating a .hgrc file in your home directory (e.g. Win 7:
C:\Users\«yourusername»\.hgrc
) and adding the following content to that file:(Home directory is
~/.hgrc
for most other desktop operating systems (Unix, Gnu/Linux, Mac osx, BSD, etc.)我不使用 git 进行存储库管理。但是,如果我猜测,我认为
hg purge
可能就是您正在寻找的。I don't use git for my repository management. However, if I were to guess, I think
hg purge
might be what you are seeking.如果您使用的是基于 linux 的系统(或 Windows cygwin),您可以:
如果这有效,您可以将其放入 ~/.hgrc:
然后只需运行:
我使用 cygwin 在 Windows 上测试了它(应该在 linux 上工作)。
If you are on a linux based system (or Windows cygwin) you can:
If this works you can put this in your ~/.hgrc:
Then simply run:
I tested this on windows using cygwin (should work on linux).