有没有可能问GIT,不要显示文件? [英] Is it possible to ask GIT, don't show a file?
问题描述
我们的应用程序包含Crashlytics以收集崩溃和做分析的东西。 Crashlytics生成 crashlytics.properties
文件并定期更新它。这个文件不应该受版本控制,我不能将它添加到 .gitignore
文件中,因为我的团队负责人不同意。
我将这个文件添加到git中(通过 git add
),然后让git不要通过 git update-index --assume-unstable crashlytics.propertise
命令。我可以看到它的状态已更改为在SmartGit工具上添加了未更改(假定和实际上
。
我的问题这个文件总是可见的,我不能再使用 git add。
,因为这个文件也会被添加:($ / b>
有什么办法可以让Git不要显示这个文件吗?任何建议都将不胜感激。谢谢。
如果你不能将它添加到的.gitignore
这是在您检查仍然可以添加 crashlytics.properties
来一个本地的 .gitignore
或者将它添加到你的全局忽略列表中。如何描述这里
I'm facing a very annoying situation.
Our application contains Crashlytics in order to collect crashes and doing Analytic stuff. Crashlytics generates crashlytics.properties
file and update it periodically. This file shouldn't be under version control and I cannot add it to .gitignore
file since my team lead doesn't agree.
I added this file into git (by git add
) and then asked git to don't track it by git update-index --assume-unchanged crashlytics.propertise
command. I'm able to see it's status changed to Added Unchanged (Assumed and Actually
on SmartGit tool.
My problem is this file is always visible and I cannot use git add .
any more since this file will be added too :(
Is there any way to ask Git to don't show this file? Any suggestion would be appreciated. Thanks.
If you are not allowed to add it to the .gitignore
which is checked in you can still add crashlytics.properties
to a local .gitignore
or add it to your global ignore list. How to do that ist described here
这篇关于有没有可能问GIT,不要显示文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!