Use git rm foo to stage the file for deletion. (This will also delete the file from the file system, if it hadn't been previously deleted. It can, of course, be restored from git, since it was previously checked it.)

To stage the file for deletion without deleting it from the file system, use git rm --cached foo

from: http://stackoverflow.com/questions/12373733/staging-deleted-files

git Staging Deleted files的更多相关文章

  1. Git tricks: Unstaging files

    NOTE: Following content is directly reprinted from http://andrewberls.com/blog/post/git-tricks-unsta ...

  2. Eclipse中java文件边的黄色数据库标志变成了蓝色小勾,导致文件修改后无法显示在Git staging窗口中,修改无法提交,怎么解决?

    出现这个问题的原因是误点击了右键点文件->Team->Advanced->Assume Unchanged, 导致结果是文件修改了无法显示在Git staging窗口中,自然无法提交 ...

  3. How do I commit all deleted files in Git?

    Try this: $ git add -u This tells git to automatically stage tracked files -- including deleting the ...

  4. git add Untracked files

    git add *  将目录里的所有文件提交到暂存区后 git status 查看状态  所有文件都是绿色的表示本地的文件和暂存区的文件是一样的 然后在本地修改一个文件 然后新建一个文件 在使用git ...

  5. [ImportNew] Perforce - Restoring Mistakenly Deleted Files in Workspace

    Shit happens when you accidentally delete some files in your workspace and you have no ideas which o ...

  6. git中Untracked files如何清除

    $ git status # On branch test # Untracked files: # (use "git add <file>..." to inclu ...

  7. git 提交ignore files

    1,首先在命令行创建.gitignore文件 $ touch .gitignore 2,在文件.gitignore 加入要忽略的文件入 $ echo *.class > .gitignore 3 ...

  8. git submodule 使用

    这个是备忘录,原网页: https://medium.com/@porteneuve/mastering-git-submodules-34c65e940407 http://cncc.bingj.c ...

  9. git的几十个基本面

    1.下载git?git-scm.com 2.获取帮助git helpgit help config 3.什么是Git?版本控制系统,Version Control System, VCS.它允许我们提 ...

随机推荐

  1. vue假全家桶升级方式,形成类似于小程序的路径管理(新增require-css与require-text)

    1.路径布局大致就是这样,完全模拟小程序,主要是靠require来做到的 2.首先index.html是这样的(配置js和css没有用requireJs主要是方便而且载入什么组件比较清晰) <! ...

  2. 十个Chatbot框架介绍

    十个Chatbot框架介绍 原创 2016年12月13日 16:01:23 4616 Chatbot列表 1.  Artificial Intelligence Markup Language    ...

  3. 不区分大小写的Flask-SQLAlchemy查询

    全部转换为小写字符再进行比较 from sqlalchemy import func user = models.User.query.filter(func.lower(User.username) ...

  4. ubuntu ufw防火墙简易教程(转)

    ufw是一个主机端的iptables类防火墙配置工具,比较容易上手.一般桌面应用使用ufw已经可以满足要求了. 安装方法 sudo apt-get install ufw 当然,这是有图形界面的(比较 ...

  5. javascript快速入门18--样式

    修改元素外观方式 修改元素外观主要有下面3种方法:修改ID,修改className,修改元素的style属性 修改ID?会造成多么混乱的结果可想而知! 修改className确实是非常好的方法,我们甚 ...

  6. npm添加淘宝镜像

    原文:http://cnodejs.org/topic/4f9904f9407edba21468f31e npm是一个很好用的工具,全场是Node Packet Manager,是一个nodejs的包 ...

  7. Unity3D 图形问题之怎样使用水?

     怎样使用水? 注意:本页所述内容仅仅适用于台式机编辑器模式. Unity 的标准资源和专业版标准资源包 (Standard Assets and Pro Standard Assets pack ...

  8. react 的死循环

    在 componentWillUpdate 中 通过 this.setState 修改状态值,可能会导致死循环,因为会调用 shouldComponentUpdate 可以通过 nextProp.pr ...

  9. android:numColumns="auto_fit" 失效问题

    GridView 设置此属性无效:android:numColumns="auto_fit" ,请确认已经设置过 android:columnWidth="*dp&quo ...

  10. sencha touch结合webservice读取jsonp数据详解

    sencha touch读取jsonp数据主要依靠Ext.data.JsonP组件,在mvc的store文件中定义代码如下: Ext.define('eparkapp.store.ParksNearb ...