为什么我的全局.gitignore文件不忽略? [英] Why doesn't my global .gitignore file ignore?

查看:73
本文介绍了为什么我的全局.gitignore文件不忽略?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

$ cat ~/.gitconfig
[core]
        editor = vim
        excludefiles = /home/augustin/.gitignore
$ cat ~/.gitignore
toto
$ mkdir git_test
$ cd git_test/
$ git init
$ touch toto
$ git status

# On branch master
#
# Initial commit
#
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#       toto
nothing added to commit but untracked files present (use "git add" to track)
$ git --version
git version 1.6.3.3

为什么不被忽略?

要考虑〜/.gitconfig中的其他设置(颜色,编辑器).

Other settings in ~/.gitconfig are taken into account (colors, editor).

推荐答案

git config --global core.excludesfile ~/.gitignore

这篇关于为什么我的全局.gitignore文件不忽略?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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