Try this:

$ git add -u

This tells git to automatically stage tracked files -- including deleting the previously tracked files.


If you are using git 2.0, you should now use:

$ git add -u :/

Warning, starting git 2.0 (mid 2013), this will stage files on the whole working tree. If you want to stage file only under your current path with that working tree, then you need to use

$ git add -u .

How do I commit all deleted files in Git?的更多相关文章

  1. nothing added to commit but untracked files present.

    当我们使用git的时候 如果我们在工作区修改了某些文件而没有新增文件,可以直接用: $ git commit --all -m "备注信息"                  -- ...

  2. 当出现no changes added to commit时如何正确使用git提交命令

    对于这个问题,最好的解决方法就是按如下步骤:1.到根目录下:git add .  :("."是必须要的)2.git commit -m "some word"3 ...

  3. [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 ...

  4. git Staging Deleted files

    Use git rm foo to stage the file for deletion. (This will also delete the file from the file system, ...

  5. git stash--在不想commit的情况下进行git pull

    公司的git开发模式是“主干发布,分支开发”,大多数情况下是多个开发在同一dev分支上进行开发,因此需要经常pull代码,如果本地工作区存在代码修改,那么pull肯定失败,提示需要先commit已修改 ...

  6. commit日志历史不一致的Git仓库合并

    有个项目,用SVN commit的在国内开源中国的码云托管,可以直接Git clone"导出"一个本地的git仓库,我在Github上新建立了一个远程的仓库,准备把在码云上clon ...

  7. recover all files with git

    leon@DGLIRUAN2 /F/linux/android/leon/workspace/AngoWidget (master) $ git log commit 2f847e3a858ecb2f ...

  8. gjt常用命令---chalee

    Git常用命令 一. git 基本操作流程 1. 从远程分支拉取并创建新的分支 git pull origin [远程分支名]:[本地分支名] // 从远程分支迁出本地分支,并切换到新的本地分支 gi ...

  9. 关于Git中的一些常用的命令

    深入了解git的checkout命令 检出命令(git checkout)是Git最常用的命令之一,同时也是一个很危险的命令. 因为这条命令会重写工作区.检出命令的用法如下: 用法一: git che ...

随机推荐

  1. c语言double类型数据四舍五入

    借助math库的round函数 #include <math.h> double ext_round(double data, int precision) { , precision); ...

  2. php preg正则表达式

    Note: 反斜线在单引号字符串和双引号字符串 中都有特殊含义,因此要匹配一个反斜线, 模式中必须写为 ”\\\\”. 译注: “/\\/”, 首先它作为字符串,反斜线会进行转义, 那么转义后的结果是 ...

  3. 【Java】ParseInt方法

    parseInt()方法首先查看位置0处的 字符,判断它是否是个有效数字:如果不是,该方法将返回NaN,不再继续执行其他操作.但如果该字符是有效数字,该方法将查看位置1处的字符,进行同样的 测试.这一 ...

  4. javascript 中解析json

    首先温习一下JSON格式: (1) 单个对象{"变量名1":"变量值1","变量名2":"变量值2"} (2) 数组[{ ...

  5. freemarker插值

    http://blog.csdn.net/chang_li/article/details/51913105 在复杂页面上(包含大量判断.日期金额格式化)的页面上,freemarker的性能比使用ta ...

  6. rhel7的xfs与Oracle database

    在rhel7下,安装oracle database时,能够选择xfs文件,例如以下: Requirements for Installing Oracle Database 12.1on RHEL7  ...

  7. window 服务(一)

    windows服务应用程序是一种长期运行在操作系统后台的程序,它对于服务器环境特别适合,它没有用户界面,不会产生任何可视输出,任何用户输出都回被写进windows事件日志.计算机启动时,服务会自动开始 ...

  8. 【WPF】当 ItemsSource 正在使用时操作无效。改用 ItemsControl.ItemsSource 访问和修改元素

    问题: 中文版报错:Additional information: 当 ItemsSource 正在使用时操作无效.改用 ItemsControl.ItemsSource 访问和修改元素. 英文版报错 ...

  9. Java并发(零)教程目录

    上网看博客的时候无意中发现了有一个Java并发的教程还不错,有20多篇讲并发的,一天翻译1篇似乎也不太难.Let's go! 原文地址:http://tutorials.jenkov.com/java ...

  10. Shell替换:Shell变量替换,命令替换,转义字符

    如果表达式中包含特殊字符,Shell 将会进行替换.例如,在双引号中使用变量就是一种替换,转义字符也是一种替换. 举个例子: 复制纯文本复制 #!/bin/bash a=10 echo -e &quo ...