混帐忽略对C项目文件 [英] Git ignore file for C projects

查看:58
本文介绍了混帐忽略对C项目文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚开始学习C(使用思考在C ),我不知道什么文件,我应该是在C项目的Git仓库忽视。

I've just started to learn C (using Thinking In C) and I'm wondering about what files I should be ignoring in a C project's git repository.

没有建议可太明显 - 我是一个总的小白。谢谢!

No suggestion can be too obvious -- I'm a total noob. Thanks!

推荐答案

我想会有一些生成的,你不wan't在你的回购协议贴敷文件(假设你的编译输出目录在您的git heirachy):

I guess there will be a few generated files that you don't wan't to be sticking in your repo (assuming your build output dir is in your git heirachy):


  • 目标文件(.o,o.obj)

  • 库(.LIB)

  • 的DLL,共享对象(的.so,.dll文件)

  • 可执行文件(.exe,a.out的?)

GIT忽略的文件是什么我倾向于做迭代。 嘿,我不需要这些东西在我的回购......

GIT ignore files are something I tend to do iteratively. "Hey, I don't need those things in my repo" ...

编辑:重新dmckee的评论

re dmckee's comment

是的,你肯定要被忽略的交换文件,临时文件等我有以下为我的.gitignore的基线:

Yep, you definately want to be ignoring swap files, temp files etc. I have the following as a baseline for my .gitignore:


  • *。SWP

  • 的〜

  • 的Thumbs.db

这篇关于混帐忽略对C项目文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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