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 do {...} while (0) 在宏定义中的作用

    如果你是一名C程序员,你肯定很熟悉宏,它们非常强大,如果正确使用可以让你的工作事半功倍.然而,如果你在定义宏时很随意没有认真检查,那么它们可能使你发狂,浪费N多时间.在很多的C程序中,你可能会看到许多 ...

  2. Python 2.7.9 Demo - 015.元组的定义、取值、遍历

    #coding=utf-8 #!/usr/bin/python final_list = ('a', 1, 'b', 2, 'c', 3); print final_list[0]; print fi ...

  3. MySQL通过视图(或临时表)实现动态SQL(游标)

    >参考de优秀文章 写MySQL存储过程实现动态执行SQL Dynamic cursor in stored procedure MySQL通过视图(或临时表)实现动态SQL(游标). 因在实现 ...

  4. Can you share some Scala List class examples?

    Scala List FAQ: Can you share some Scala List class examples? The Scala List class may be the most c ...

  5. vue2.0使用动态组件实现tab切换效果(vue-cli)

    <template> <div> <div>#动态组件实现tab切换效果#</div><br><br><br> &l ...

  6. 给singer的左侧添加fixedTitle,并显示向上滚动偏移效果;

    1.将写好的dom绝对定位到顶部: 2.dom值为singerlist的currentIndex.title(通过计算属性获取),如果有则显示fixedTitle,没有则隐藏: 3.计算diff:当d ...

  7. python2安装pymongo

    wget --no-check-certificate https://pypi.python.org/packages/source/p/pymongo/pymongo-2.6.3.tar.gz#m ...

  8. 【iOS】TableView的footerView不随cell滚动而停留在tableView底部的问题

    苹果官方给我提供TableView的FooterView和HeaderView停留在顶部的非常不错效果,有时候我们不须要这些FooterView和HeaderView停留在底部或者上部,如今就以Foo ...

  9. 未能加载文件或程序集Office,Version=11.0.0.0

    关于"未能加载文件或程序集“Office, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c”或它的某一个 ...

  10. uboot在nandflash存储时内存和NandFlash存储空间

    硬件采用nandflash,nandflash为8位数据宽度,没有dataflash和norflash. Nandflash空间分配为 bootstrap + u-boot + env + linux ...