什么是.gitignore?(What is .gitignore exactly?)

编程入门 行业动态 更新时间:2024-10-28 10:35:07
什么是.gitignore?(What is .gitignore exactly?)

我刚刚创建了一个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.

更多推荐

本文发布于:2023-08-05 19:02:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1437348.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:gitignore

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!