Is it possible to ask GIT, don't show a file?

夙愿已清 提交于 2019-12-24 03:42:41

问题


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.


回答1:


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



来源:https://stackoverflow.com/questions/28186955/is-it-possible-to-ask-git-dont-show-a-file

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!