Linux中,这时把全局要忽略的文件列表.gitignore放当前用户根目录下:

git config --global core.excludesfile '~/.gitignogtire'

Windows中,这时把全局要忽略的文件列表.gitignore放当前用户根目录下:

git config --global core.excludesfile "%USERPROFILE%\.gitignore"

这个配置在给搭建本地环境共同管理多个类似项目很管用,
比如:
我有一个配置文件config目录,它同时链接到 项目A/config目录和项目B/config目录,当然我们在项目A和B中都是要忽略config这个链接文件了,这时在~/.gitignore中添加一行忽略这个链接文件就好了.

相关链接:http://stackoverflow.com/questions/7335420/global-git-ignore

git config --global core.excludesfile配置gitignore全局文件的更多相关文章

  1. git config --global core.autocrlf false

    git config --global core.autocrlf  false warning: LF will be replaced by CRLF in .idea/vcs.xml.The f ...

  2. 设置 git config 的一些默认配置

    设置 git status的颜色. git config --global color.status auto 一.Git已经在你的系统中了,你会做一些事情来客户化你的Git环境.你只需要做这些设置一 ...

  3. [git]解决:git config --global push.default matching

    解决:git config --global push.default matching 这个警告的意思是:需要设置默认push的分支,所以设置好全局push的默认分支就好了.命令如下: 在有git目 ...

  4. git commit 提交的时候,出现*** Please tell me who you are. git config --global 。。。问题

    $ git commit -a -m 'v6' *** Please tell me who you are. Run git config --global user.email "you ...

  5. git提交错误 git config --global user.email “you@example.com“ git config --global user.name “Your Name

    1 Commit failed - exit code 128 received, with output: '*** Please tell me who you are. 2 3 Run 4 5 ...

  6. docker squid---but git proxy should specify by git config --global http.proxy http:...

    Usage of loopback devices is strongly discouraged for production use. Either use `--storage-opt dm.t ...

  7. git config --global user.email

    加上这个就ok

  8. Please tell me who you are. Run git config --global user.email "you@example.com" git config --global user.name "Your Name"

    解决办法

  9. git 设置 .gitignore 为全局global + 配置.gitignore为全局后不生效解决办法

    outline 什么是 .gitignore 以及 .gitignore 的作用,这里不做赘述,自行网上查阅. 设置 .gitignore 为全局生效 懒得自己逐行敲忽略规则的话,建议移步:https ...

随机推荐

  1. 【二分】【最长上升子序列】HDU 5489 Removed Interval (2015 ACM/ICPC Asia Regional Hefei Online)

    题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=5489 题目大意: 一个N(N<=100000)个数的序列,要从中去掉相邻的L个数(去掉整个区间 ...

  2. 数据结构——HDU1312:Red and Black(DFS)

    题目描述 There is a rectangular room, covered with square tiles. Each tile is colored either red or blac ...

  3. 什么是左值(what is a lvalue)?

    引用并翻译自<C++ premier plus> 左值是可以通过地址引用的数据对象(data object),例如,变量,数组的元素,结构体的成员,引用变量,以及复引用的指针(defere ...

  4. 动态规划——数位dp

    通过先前在<动态规划——背包问题>中关于动态规划的初探,我们其实可以看到,动态规划其实不是像凸包.扩展欧几里得等是具体的算法,而是一种在解决问题中决策的思想.在不同的题目中,我们都需要根据 ...

  5. 无题II hdu 2236(二分枚举区间)

    分析:只需要用二分找一个区间,然后不断枚举这个区间是否可以达到最大匹配,一直二分到答案为止.   代码: =============================================== ...

  6. PHP面试题(二)

    前言 从网上找了一套号称是百度的php面试题目,这里记录一下 PHP的gc机制 php的垃圾回收机制注意以下几点即可: 引用计数refcount和is_ref,也就是php不会随意的malloc内存空 ...

  7. C++ 求阶乘 四种方法

    来总结下求阶乘的各种方法哈. 写在最前:①各个代码仅仅是提供了求阶乘的思路,以便在实际须要时再来编码,代码并不健壮!②各个程序都在1到10内測试正确. 代码一: #include<iostrea ...

  8. 构建服务端的AMD/CMD模块加载器

    本文原文地址:http://trock.lofter.com/post/117023_1208040 . 引言:  在前端开发领域,相信大家对AMD/CMD规范一定不会陌生,尤其对requireJS. ...

  9. KMP学习笔记

    功能 字符串T,长度为n. 模板串P,长度为m.在字符串T中找到匹配点i,使得从i开始T[i]=P[0], T[i+1]=P[1], . . . , T[i+m-1]=P[m-1] KMP算法先用O( ...

  10. css.day04.eg

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...