有的时候,不小心提交了一个配置文件config.php,每次在本地开发测试之后,都需要更改配置文件。相当麻烦。

使用

git update-index --assume-unchanged   /path/file 可以忽略这个修改。从而不用提交到库里面。

字面意思很好理解

assume  假设

unchanged 未更改。

如果想恢复该文件,可以用

 git update-index --no-assume-unchanged /path/file  来恢复跟踪

但是有个问题。如何更改让其他协同开发的同事也能生效,从而避免提交该文件呢?

git update-index --assume-unchanged的更多相关文章

  1. [转]使用Maven添加依赖项时(Add Dependency)时,没有提示项目可用,并且在Console中,输出: Unable to update index for central|http://repo1.maven.org/maven2 。

    使用Maven添加依赖项时(Add Dependency)时,没有提示项目可用,并且在Console中,输出: Unable to update index for central|http://re ...

  2. git “bad index file sha1 signature fatal: index file corrupt”错误

    在执行commit或revert等操作时,提示“bad index file sha1 signature fatal: index file corrupt”错误,导致操作失败.这是由于git的in ...

  3. Unable to update index for central

    Unable to update index for central http://repo1.maven.org/maven2/ 就是这句,myeclipse启动后控制台输出这句话:解决办法:1.在 ...

  4. Android Studio 通过 git update 或者 pull 的时候出错及解决办法

    Android Studio 通过 git update 或者 pull 的时候出错,log 如下: Couldn't save uncommitted changes. Tried to save ...

  5. 解决eclipse安装maven的问题:Unable to update index for central|http://repo1.maven.org/maven2

    问题产生如下:因为单位使用了过滤,访问Internet时,超过10M的内容就拒绝.因为maven插件在初始时,需要下载Maven的index文件,这个文件比较大,有38M多,下载不成功.所以造成使用M ...

  6. Unable to update index for central http://repo1.maven.org/maven2/ 解决方法

    不知道什么原因 MyEclipse(eclipse) 中的 maven 插件突然不能用了,修改 pom.xml 无任何反应 控制台报 Unable to update index for centra ...

  7. 解决MyEclipse开启后总是不停的在Update index

    近期MyEclipse开启之后总是不停的在 update index,非常是耗时间. 查找资料发现Update index...是Maven在不断更新, 解决的方法例如以下: Window --> ...

  8. Unable to update index for nexus-publish | http://ip:port/repository/maven-public/

    问题描述:Unable to update index for nexus-publish | http://ip:port/repository/maven-public/ 解决方案:进入工作空间. ...

  9. [MongoDB] Query, update, index and group

    /* 1. Query Operators */ db.posts.find({ viewsCount: {$get: 1000, $lte: 3000} }, {_id: 0, viewsCount ...

  10. 彻底解决m2eclipse之Unable to update index for central

    原文链接:https://my.oschina.net/itblog/blog/208581 maven是个好东西,eclipse上的maven插件m2eclipse也非常方便,但是最近这个东西经常无 ...

随机推荐

  1. PHP 中Session 反序列化机制的三种方法

    �php.ini中存在三项配置项: session.save_path="" --设置session的存储路径 session.save_handler=""- ...

  2. solr dataimport中遇到的问题

    1.windows的tomcat是没有catalina.out的,可以通过修改start.bat和catalina.bat的方式让日志输出到catalina.out 2.按照网上搜到的资料配置好sol ...

  3. 【OI】拓扑排序

    拓扑排序 首先要求图为DAG 算法:首先将度为1的节点加入队列每次取出队首点u,在图中删去和u相邻的边继续将度数为1的点加入队列 到了最后, 如果没有度数为1的点,则图不是DAG 通过拓扑排序可以给D ...

  4. HDU4251-The Famous ICPC Team Again(划分树)

    Problem Description When Mr. B, Mr. G and Mr. M were preparing for the 2012 ACM-ICPC World Final Con ...

  5. win10上修改docker的镜像文件存储位置

    记住:修改的是docker从服务器上拉下来的镜像文件存储位置(本地),是不是镜像源地址(服务器) 首先 win10下的docker有可视化操作界面和命令行操作,下载了docker-ce.exe双击后就 ...

  6. Effective Modern C++:03转向现代C++

    07:在创建对象时注意区分()和{} 自C++11以来,指定初始化值的的方式包括使用小括号,等号,以及大括号: ); // initializer is in parentheses ; // ini ...

  7. MUI - 实现关闭除指定页面外的其他所有页面的功能

    实现关闭除指定页面外的其他所有页面的功能 比如在实现注销登录功能时,要保证旧有的webweiw或缓存不影响新用户的操作,就需要在跳转到登陆页面前关闭其他页面. http://www.cnblogs.c ...

  8. HDU 5572 An Easy Physics Problem【计算几何】

    计算几何的题做的真是少之又少. 之前wa以为是精度问题,后来发现是情况没有考虑全... 题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=5572 题意: ...

  9. java执行sql语句使用别名时显示Column '***' not found

    java执行sql语句使用别名时显示Column '*' not found 在做一个小项目时遇到个问题,执行sql语句使用别名时总是报sql异常 Column '*' not found,折腾半天终 ...

  10. 洞见数据库前沿 集结阿里云数据库最强阵容 DTCC 2019 八大亮点抢先看

    摘要: 作为DTCC的老朋友和全球领先的云计算厂商,阿里云数据库团队受邀参加本次技术盛会,不仅将派出重量级嘉宾阵容,还会为广大数据库业内人士和行业用户奉上8场精彩议题.下面小编就为大家提前梳理了8大亮 ...