什么是.gitignore? [英] What is .gitignore exactly?
问题描述
我刚刚创建了一个Github存储库,并想知道 .gitignore
文件的用途。我开始时没有创建一个,但由于大多数存储库都有一个,因此添加了一个。
我需要一个吗?我能/我只是忽略它,还是有用处?
我对这个主题做了一些研究,但是找不到具体的解释。
.gitignore
告诉git应忽略哪些文件(或模式)。它通常用于避免从工作目录提交对其他协作者无用的临时文件,例如编译产品,IDE创建的临时文件等。
您可以在此处查找完整详情。
I just created a Github repository and was wondering what the .gitignore
file was for. I started by not creating one, but added one due to the fact that most repositories have one.
Do I need to have one? Can/do I just ignore it, or does it have a use?
I did some research on the subject but couldn't find a concrete explanation.
.gitignore
tells git which files (or patterns) it should ignore. It's usually used to avoid committing transient files from your working directory that aren't useful to other collaborators, such as compilation products, temporary files IDEs create, etc.
You can find the full details here.
这篇关于什么是.gitignore?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!