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. 将socket通信变成并发的方式

    一 利用multiprocessing模块,开启多进程,实现socket通信并发 1. 开启子进程的两种方式 import time import random from multiprocessin ...

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

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

  3. electron-vue 项目搭建的地址

    https://simulatedgreg.gitbooks.io/electron-vue/content/en/ 现在的网址:vue的electron的文件: https://github.com ...

  4. js用new Object创建json数据

    var str = '';var json = new Object;var arr =new Array(); for(var i =0; i<4;i++){        var jsons ...

  5. c++重载前置++和--

    C语言中,前置和后置++,--都不能作为左值,而在c++中,前置的++和--可以作为左值,从下面的重载运算符中也可以看出,它们返回的是引用,我不知道为什么这里和c语言中不同,但c++类似的提升还有三目 ...

  6. C语言 · 拿糖果

    算法提高 拿糖果   时间限制:1.0s   内存限制:256.0MB      问题描述 妈妈给小B买了N块糖!但是她不允许小B直接吃掉. 假设当前有M块糖,小B每次可以拿P块糖,其中P是M的一个不 ...

  7. git中文乱码解决方案

    解决方案: 在bash提示符下输入: git config --global core.quotepath false core.quotepath设为false的话,就不会对0x80以上的字符进行q ...

  8. tar -cvzf a.tar.gz a --remove-files,tar命令执行原理

    tar -cvzf  a.tar.gz a --remove-files [root@nfs01 backup]# tar -zcvf  88.tar.gz    --remove-files  /b ...

  9. win7/win8下手工搭建WAMP环境

    win7/win8下手工搭建WAMP环境. 最近学习wamp,看了好多教程,出来好多问题,终于成功搞定,这里集合了一下最好的教程,写了一些自己的经验,希望大家有用 这里不能上传图片,我就写了个带pdf ...

  10. HTTP API 设计指南(响应部分)

    前言 这篇指南介绍描述了 HTTP+JSON API 的一种设计模式,最初摘录整理自 Heroku 平台的 API 设计指引 Heroku 平台 API 指引. 这篇指南除了详细介绍现有的 API 外 ...