在Git仓库中提交什么类型的文件而忽略? [英] What type of files to commit versus ignore in a Git repository?

查看:123
本文介绍了在Git仓库中提交什么类型的文件而忽略?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,我希望使用GitHub和Bitbucket作为回购(取决于我是否需要公开与私有),而且我的很多工作还包括LaTeX工作(所以有.tex,.png和.pdf文件)以及速度测试(所以我可能有.csv和.Rdata文件)。



我很难确定哪种文件应该成为他们的方式进入我的回购,而与README.mds内部应该链接。



有没有人有任何简单的哲学或硬性规定,他们想分享?通常会忽略二进制文件,尤其是大文件。 Git不会像SVN那样执行大文件或二进制文件跟踪。



如果必须的话,只要小文件(例如png)可以例外没有太多变化。


So I want use both GitHub and Bitbucket as repos (depending if I want something to be public versus private) and a lot of my work also includes LaTeX work (so there are .tex, .png, and .pdf files) as well as speed tests (so I may have .csv, and .Rdata files).

I'm having a hard time determining what kinds of files should make their way into my repos versus which should be linked to inside the README.mds.

Does anyone have any simple philosophies or hard-and-fast rules they'd like to share?

解决方案

Generally ignore binary files, and especially large files. Git doesn't do large or binary file tracking with aplomb like SVN can.

If you must, exceptions can be made for small files (i.e. png's) as long as they aren't changing too much.

这篇关于在Git仓库中提交什么类型的文件而忽略?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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