Git CMD - rm: Remove files from the working tree and from the index
命令格式
git rm [-f | --force] [-n] [-r] [--cached] [--ignore-unmatch] [--quiet] [--] <file>…
命令参数
-f, --force
强制删除。
-r
递归删除目录及其内容。
-- cached
从暂存区移除文件,不再跟踪文件,工作区的文件仍保留下来。
-q, --quit
安静模式。
实例
a) 从工作区和暂存区将文件移除。
$ git rm testfile.txt
b) 从工作区和暂存区将目录移除。
$ git rm -rf src/
c) 从暂存区移除文件,不再跟踪文件,工作区的文件仍保留下来。
$ git rm --cached testfile.txt
Git CMD - rm: Remove files from the working tree and from the index的更多相关文章
- Git CMD - checkout: Switch branches or restore working tree files
命令格式 git checkout [-q] [-f] [-m] [<branch>] git checkout [-q] [-f] [-m] --detach [<branch&g ...
- [Practical Git] Remove unnecessary git tracking with .gitignore files
Most projects have automatically generated files or folders from the operating system, applications, ...
- git checkout 提示 “error: The following untracked working tree files would be overwritten by checkout” 解决
问题描述 Windows 或者 macOS 操作系统中,文件名是不区分大小写的.对于已经提交到仓库中的文件修改文件名的大小写,然后又用 git rm 命令将老文件从 Git 仓库删除掉,并保存下新的文 ...
- Git操作删除 untracked files
最近使用git 管理项目的时候,编译过程中出现了很多中间文件,今天发现使用 git clean 命令可以很方便进行清除: # 删除 untracked files git clean -f # 连 u ...
- Git CMD连接,管理(remote,add,commit,push)github repository
git initmd testcd testgit statusgit add test //git add test/a.txtgit status git remote add origin g ...
- npm run eject 命令后出现This git repository has untracked files or uncommitted changes错误
npm run eject 暴露隐藏的文件,不可逆 结果出现下面的问题 This git repository has untracked files or uncommitted changes: ...
- Git GUI,Git Bash,Git CMD之间的区别
Git GUI,Git Bash,Git CMD之间的区别 Git Bash: Bash,Unix shell的一种,Linux与Mac OS X v10.4都将它作为默认shell.Git Bash ...
- git之删除untrack files
退回版本 git reset --hard commit_id //不保留未提交的修改 git reset --soft commit_id //默认方式,保留未提交的修改 撤除本地没有提交的修改 g ...
- [MST] Remove Model Instances from the Tree
In this lesson we will dive a bit more into the tree semantics of MST. In this lesson you will learn ...
随机推荐
- 分析恶意驱动(进程启动apc注入dll)
一.前言 用IDA也有好些时间了,以前就只会用F5功能玩无壳无保护的裸驱动,感觉太坑了,这两天就开始看网上大牛的逆向. 今天记录一下sudami曾经逆向过的fuck.sys.第一遍自己走的时候漏掉了 ...
- cocos2d-x 仿真树叶飘落效果的实现
转自:http://blog.csdn.net/ufolr/article/details/7624851 最近项目中需要一个落叶的效果,本来想用粒子特效来实现,但是几经调试,虽然调出了落叶的效果,但 ...
- 《C语言编写 学生成绩管理系统》
/* (程序头部凝视開始) * 程序的版权和版本号声明部分 * Copyright (c) 2011, 烟台大学计算机学院学生 * All rights reserved. * 文件名: 学生成绩管理 ...
- main方法执行之前,做什么事
1.我们知道程序的入口是main方法,那么在执行main方法之前,需要做些什么准备工作呢? 2.main方法执行之前,必须要把non-local static对象构造完成.static对象有:全局对象 ...
- Codeforces Round #333 (Div. 2) C. The Two Routes flyod
C. The Two Routes Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/602/pro ...
- hdu 5427 A problem of sorting 水题
A problem of sorting Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://bestcoder.hdu.edu.cn/contest ...
- C#的WebBrowser操作frame如此简单
刚学c#不久,也不太懂什么IHTMLDocument.IHTMLDocument2.IWebBrowser2等等.自己琢磨了好久,终于知道了怎么用WebBrowser操作frame和iframe. 1 ...
- Android实现图表绘制和展示
本文演示在Android平台中绘制和展示图表示例,本示例是基于RChart 2实现的. 在一个系统中经常要用到图表统计数据,在WEB开发中图表绘制是一件简单的事情,因为有比较多的开源方案.但在Andr ...
- Metadata Lock原理5
[MySQL] 之一2015-09-05 15:46:51 分类: MySQL 一 简介 和MySQL打交道比较多的朋友,肯定遇到过 "Waiting for table metadata ...
- solaris知识库
http://xjsunjie.blog.51cto.com/999372/d-9/p-1