Chinaunix首页 | 论坛 | 博客
  • 博客访问: 795627
  • 博文数量: 172
  • 博客积分: 3836
  • 博客等级: 中校
  • 技术积分: 1988
  • 用 户 组: 普通用户
  • 注册时间: 2011-02-10 14:59
文章分类

全部博文(172)

文章存档

2014年(2)

2013年(1)

2012年(28)

2011年(141)

分类: LINUX

2012-03-26 17:52:26

刚使用git,在编译过源码后,使用git add . 把.o文件也加进去。刚到很不方便。其实只要配置一下,就可以在git add .时忽略指定文件。
具体配置方法如下:
~/.gitconfig 中文件添加excludesfile:
[core]
    editor = vim    //这个也可以设置环境变量GIT_EDITOR=vim
    excludesfile = /home/root/.gitignore
[user]
    name = 
    email = 

再创建~/.gitignore,并在其中添加内容:
*.[oa]
*~
*.map
*.order
*.txt
*.symvers
*.mod
*.cmd
cscope*
tags
vmlinux
[zu]Image
Image
.tmp*
*.swp
*.gz
*.txt
.svn
*.ko
modules.builtin
piggy.gzip
阅读(4625) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~