git rm使用

简介:

git rm file将文件从缓存区和你的硬盘中(工作目录)删除

git rm demo1.txt

命令行输出

wKioL1jKBe3Av_V0AABEaqlf4eM660.png-wh_50


git rm --cached file在工作目录中留着该文件

git rm --cached hello.php

命令行输出

wKioL1jKBleQ-SyNAAAv9XD0gzA168.png-wh_50


本文转自 素颜猪 51CTO博客,原文链接:http://blog.51cto.com/suyanzhu/1907157


相关文章
|
缓存 开发工具 git
git rm --cached 命令如何解决疑难杂症
git rm --cached 命令如何解决疑难杂症
|
开发工具 git
git报错:usage: git remote remove <name>(使用git remote rm origin 报错)
git报错:usage: git remote remove <name>(使用git remote rm origin 报错)
218 0
|
开发工具 git
【Git】Git 版本管理 ( 补充提交版本 git commit --amend | 版本库提取文件 git checkout -- filename | 删除文件 git rm )(二)
【Git】Git 版本管理 ( 补充提交版本 git commit --amend | 版本库提取文件 git checkout -- filename | 删除文件 git rm )(二)
305 0
【Git】Git 版本管理 ( 补充提交版本 git commit --amend | 版本库提取文件 git checkout -- filename | 删除文件 git rm )(二)
|
开发工具 git
【Git】Git 版本管理 ( 补充提交版本 git commit --amend | 版本库提取文件 git checkout -- filename | 删除文件 git rm )(一)
【Git】Git 版本管理 ( 补充提交版本 git commit --amend | 版本库提取文件 git checkout -- filename | 删除文件 git rm )(一)
786 0
【Git】Git 版本管理 ( 补充提交版本 git commit --amend | 版本库提取文件 git checkout -- filename | 删除文件 git rm )(一)
|
开发工具 git
Git学习第九课 移除文件(git rm)
如果我们不想要一个文件了,如何从git上移除它呢?我们在这一小节就学习一个新的命令 git rm命令。 一、删除本地并且删除远端文件 比如,我们想删除git上的test.txt文件。
963 0
|
5月前
|
开发工具 git
Git版本控制工具合并分支merge命令操作流程
通过以上步聚焦于技术性和操作层面指南(guidance), 可以有效管理项目版本控制(version control), 并促进团队协作(collaboration).
1044 15
|
8月前
|
安全 开发工具 git
git的常用操作命令
git的常用操作命令
521 57