在商业上,什么是最好的方法来忽略对文件的更改而不从任何人的存储库中删除工作副本 [英] in mercurial what is the best way to ignore changes to a file without removing the working copy from anyone's repository

查看:65
本文介绍了在商业上,什么是最好的方法来忽略对文件的更改而不从任何人的存储库中删除工作副本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不希望从其他开发人员的计算机上删除此文件,但是我也不想再对其进行跟踪.基本上,它是一个设置文件,不应首先将其检入.

I don't want this file to be removed from other developer's machines, but I don't want it tracked anymore either. It is basically a setting file, that shouldn't have been checked in in the first place.

我认为我必须告诉其他开发人员备份此文件.然后,我可以进行删除,并将其添加到.hgignore中.然后,他们必须将文件放回其工作目录中.

I think I have to tell the other developers to back up this file. Then I can do a remove, and add it to the .hgignore. Then they have to put the file back into their working directory.

似乎hg忘了只能在我的机器上工作,然后下一次其他开发人员进行拉动时,它会擦掉他们的文件.

It seems like hg forget would only work for my machine, and then next time another developer does a pull it would wipe out their file.

有什么提示吗?

推荐答案

他们不需要备份它.它已备份到存储库中.您可能希望让他们提交最新版本,然后他们才退出您的行列,以免他们丢失最新更改.当他们丢失文件时,他们可以先执行hg log <file>然后执行hg revert <latest revision - 1> <file>找回文件.

They don't need to back it up. It's backed up in the repository. You might want to get them to commit their latest version before they pull from you so they don't lose their latest changes. When they lose their file they can just do hg log <file> and then hg revert <latest revision - 1> <file> to get it back.

这篇关于在商业上,什么是最好的方法来忽略对文件的更改而不从任何人的存储库中删除工作副本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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