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 3308 LCIS

    LCIS Time Limit: 6000/2000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submis ...

  2. prim模板题

    题目链接:http://acm.hrbeu.edu.cn/index.php?act=problem&id=1223 #include <cstdio> #include < ...

  3. hdu 4604 Deque(最长上升与下降子序列-能够重复)

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4604 这个题解有点问题,暂时没时间改,还是参考别人的吧 #include <cstdio> ...

  4. Swing实现文件选择(目录选择)附导出

    具体生成工具如图: (1) (2) (3) (4) 源码 : example.java package org.qiailin.jframe; import java.awt.Container; i ...

  5. FindControl的使用方法

    Control.FindControl (String):在当前的命名容器中搜索带指定 id参数的服务器控件.(有点类似javascript中的getElementById(string)) 简单的例 ...

  6. python面向对象【初级篇】

    概述 python支持多种编程范式:面向过程.面向对象.面向切面(装饰器部分)等. 面向过程:根据业务逻辑从上到下写垒代码 函数式:将某功能代码封装到函数中,日后便无需重复编写,仅调用函数即可 面向对 ...

  7. [HDU 2049] 不容易系列之(4)——考新郎 (错排问题)

    不容易系列之(4)——考新郎 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2049 题目大意: 有N对新婚夫妇,其中所有的新娘站成一列,都盖上了红布. ...

  8. jq實現網頁個性title

    <!DOCTYPE html> <html content="text/html; charset=UTF-8"> <title>tooltip ...

  9. static对象的高级用法

    1. 函数里static对象是local的,其他如全局对象,类里的static对象都是非local的,会在程序初始化中提前创建 2. 非local的对象的创建无法确定先后次序,但能保证在main函数前 ...

  10. Day4 - Python基础4 迭代器、装饰器、软件开发规范

    Python之路,Day4 - Python基础4 (new版)   本节内容 迭代器&生成器 装饰器 Json & pickle 数据序列化 软件目录结构规范 作业:ATM项目开发 ...