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. SourceInsight-查看java中接口对应的实现类

    1.双击选中需要查看的接口名称,然后右击选择“Show in Relation Window” 2.然后在右侧会弹出一个Relation的窗口 如果没有列出对应的实现类,可以在接口名上再次右击,依次选 ...

  2. Rewrite MSIL Code on the Fly with the .NET Framework Profiling API

    http://clrprofiler.codeplex.com/ http://blogs.msdn.com/b/davbr/archive/2012/11/19/clrprofiler-4-5-re ...

  3. 57. 3Sum【medium】

    Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all un ...

  4. python 使用py2exe将python 脚本生成exe可执行文件

    使用python的py2exe模块可以很容易地帮助我们将python脚本生成可执行的exe程序.这样我们就可以让脚本脱离虚拟机的束缚,从而独立运行. 首先安装py2exe分解步骤如下:(pip和eas ...

  5. 使用Konva创建进度条

    <!doctype html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  6. 字符设备驱动笔记——poll机制分析(七)

    poll机制分析 所有的系统调用,基于都可以在它的名字前加上“sys_”前缀,这就是它在内核中对应的函数.比如系统调用open.read.write.poll,与之对应的内核函数为:sys_open. ...

  7. Django 笔记(来源于讲师)以及常见问题的解决

    写1.Django加载静态文件 1.首先在项目的根目录下,新建static文件夹 2在settings.py中加入这两句话.表明从项目的跟目录找static文件夹 3.在HTML文件中导入{% loa ...

  8. VBA学习笔记(6)--抽取第一列中叫“虹虹”的个人信息

    说明(2017.3.25): 1. 知识点为dim arr2(1 to 1000, 1 to 4)先定义一个足够大的二维数组,不然后面需要transpose转置成一维数组. '抽取列表中叫“虹虹”的所 ...

  9. 一款基于css3的动画按钮

    之前为大家分享了 推荐10款纯css3实现的实用按钮.今天给大家带来一款基于css3的动画按钮.实现的效果图如下: 在线预览   源码下载 实现的代码. html代码: <div class=& ...

  10. [转] Fragment——startActivityForResult后onActivityResult无反应之问题总结

    转自:http://m.blog.csdn.net/article/details?id=49507025 摘取片段如下 个人测试后的一些总结: 1.Fragment中直接使用startActivit ...