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. uboot从SD卡烧写内核和文件系统

    环境:ubuntu 13.04一.首先制作sd启动盘: 插入SD卡    sudo dd iflag=dsync oflag=dsync if=tiny210v2-uboot.binof=/dev/m ...

  2. 动态规划(水题):COGS 261. [NOI1997] 积木游戏

    261. [NOI1997] 积木游戏 ★★   输入文件:buildinggame.in   输出文件:buildinggame.out   简单对比时间限制:1 s   内存限制:128 MB S ...

  3. 关于sed中的Pattern Space和Hold Space的随笔

    首先是一部分概念和示例,这部分转自:http://coolshell.cn/articles/9104.html Pattern Space 第零个是关于-n参数的,大家也许没看懂,没关系,我们来看一 ...

  4. HDOJ(HDU) 2164 Rock, Paper, or Scissors?

    Problem Description Rock, Paper, Scissors is a two player game, where each player simultaneously cho ...

  5. vijosP1194 Domino

    vijosP1194 Domino 链接:https://vijos.org/p/1194 [思路] 矩阵相乘. 参考Matrix67的文章: [代码] #include<cstdio> ...

  6. Vagrant 集群的部署

    使用Vagrant部署集群 一.运行多个虚拟机 我们通过配置Vagrantfile配置两个虚拟机--web服务器和数据库服务器. Vagrant::configure("2") d ...

  7. Eucalyptus安装包的功能列表

    aoetools    是一个用来在以太网上运行 ATA 存储协议的软件,相当于一个网络存储功能.euca2ools  eucalpytus客户端杜昂管理工具axis2c       SOAP引擎,同 ...

  8. foxmail客户端总是提示接收密码错误

    如上图所示. 我知道的一个原因是 发送太多邮件所致,导致发件服务器触发规则限制登录. 如果之前发的不是很多的话,可以在设置的帐号选项里删除这个账户,再重新建一个.

  9. mysql 加入�列,改动列,删除列。

    MySQL 加入�列,改动列,删除列 ALTER TABLE:加入�,改动,删除表的列,约束等表的定义. 查看列:desc 表名; 改动表名:alter table t_book rename to ...

  10. Fuel4D 2.1 免费跨平台游戏引擎 现已发布

    Fuel4D 2.1 免费跨平台游戏引擎 现已发布 开发环境:纯 C/C++,无JAVA.O-C. 支持 WIN32.安卓 系统. 详情见官方网站:http://www.fuel4d.com 或者进F ...