TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

A Collection of Useful .gitignore Templates

171 点作者 gintas超过 14 年前

5 条评论

pilif超过 14 年前
I'm of the opinion that artifacts of IDEs an OSes should not be part of a projects .gitignore. After all, different people could be using different environments for development and I really don't see the need for a projects .gitignore to contain the subset of all possible artifacts.<p>Use .git/info/exclude or a repository independent personal .gitignore for this.<p>The projects file is for files created by running the code or maybe some unavoidable build artifacts happening in all cases (.o files for example)<p>I really hate commits with messages like "updating .gitignore for Joe's new IDE"
avar超过 14 年前
Some projects like Git itself refuse to add editor droppings like <i>~ and #</i> to .gitignore. They consider the .gitignore file to be <i>only</i> for things that the build system produces, e.g. *.o and binaries.<p>If you want to ignore things that your editor adds you should add it in .git/info/excludes, not .gitignore.
评论 #1926176 未加载
评论 #1926528 未加载
chr15超过 14 年前
If you are using Django/Python, it might be useful to add *.pyc to your gitignore. These are compiled python files.<p>Also, if you're developing on a Mac, it would also be useful to add .DS_Store. It's an invisible file, and it just stores some properties of that directory,
评论 #1925752 未加载
评论 #1925753 未加载
eeperson超过 14 年前
It seems like a lot of these should have leading slashes so they only match the root directory and not any file with that name.
mcav超过 14 年前
Anyone got a good Clojure one?
评论 #1925895 未加载