.gitignore 到底是什么? [英] What is .gitignore exactly?

查看:39
本文介绍了.gitignore 到底是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚创建了一个 Github 存储库,想知道 .gitignore 文件的用途.我一开始没有创建一个,但由于大多数存储库都有一个,因此添加了一个.我需要有一个吗?我可以/我是否可以忽略它,或者它有用吗?我对这个主题做了一些研究,但找不到具体的解释.

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 告诉 git 它应该忽略哪些文件(或模式).它通常用于避免从您的工作目录提交对其他协作者无用的临时文件,例如编译产品、IDE 创建的临时文件等.

.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屋!

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