git rm与git rm --cached
当我们需要删除暂存区
或分支
上的文件, 同时工作区也不需要这个文件了, 可以使用
git rm file_path
git commit -m 'delete somefile'
git push
当我们需要删除暂存区
或分支
上的文件, 但本地又需要使用, 只是不希望这个文件被版本控制, 可以使用
git rm --cached file_path
git commit -m 'delete remote somefile'
git push
git rm与git rm --cached的更多相关文章
- 第23月第24天 git命令 .git-credentials git rm --cached git stash clear
在git push的时候,有时候我们会想办法撤销git commit的内容 1.找到之前提交的git commit的id git log 找到想要撤销的id 2.git reset –hard id ...
- rm 、git rm 、git rm --cached的区别
rm 删除文件 git rm git rm 当我们需要删除暂存区或分支上的文件, 同时工作区也不需要这个文件了, 可以使用git rm git rm file = rm file+ git add f ...
- Git git rm和git rm --cached
git rm 和 git rm --cached 的区别 git rm file git commit -m "xxx" git push origin master 删除本地及仓 ...
- git rm与git rm --cached的区别
git rm与git rm --cached的区别 当我们需要删除暂存区或分支上的文件, 同时工作区也不需要这个文件了, 可以使用. git rm file_path git commit -m 'd ...
- [git] 细说commit (git add/commit/diff/rm/reset 以及 index 的概念)
http://kasicass.blog.163.com/blog/static/39561920133294219374/ 创建测试仓库 $ git init $ echo "line o ...
- git命令——git rm、git mv
git rm git rm命令官方解释 删除的本质 在git中删除一个文件,本质上是从tracked files中移除对这些文件的跟踪.更具体地说,就是将这些文件从staging area移除.然后c ...
- git 常用命令 mv rm checkout revert reset
关于上节讲的git add 时需要添加注释信息,也可以在git commit时再添加 laoni@DESKTOP-TPPLHIB MINGW64 /c/laoni/PycharmProjects/gi ...
- git rm与直接rm的区别
git rm 行为: 1.删除一个文件 2.将被删除的这个文件纳入缓存区 $ git rm a rm 'a' $ git status On branch master Changes to be c ...
- rm -rf .git/gc.log
rm -rf .git/gc.log ➜ test git:(abc) gp Auto packing the repository in background for optimum perform ...
随机推荐
- 如何实现两台Domino之间的相互访问
一)交叉验证 1启动Administrator软件,连接到您的服务器,点击"配置"标签. 2点击右边屏幕"工具"--"验证字"--"交叉验证" 3选择您自己的cert.id,输入其口 ...
- LR接口性能测试提示Code - 60990 Error: Two Way Communication Error: Function two_way_comm_post_message / two_ (转载)
一.在做JAVA接口性能测试时,场景在运行中出现:Code - 60990 Error: Two Way Communication Error: Function two_way_comm_post ...
- MySQL表名大小写敏感导致的问题
最近在项目中遇到一个比较奇怪的小问题.在开发过程中自己测试没有问题,但是提测后,测试的同时在测试一个功能时报错了,日志是: Caused by: com.mysql.jdbc.exceptions ...
- Ubuntu下的init.d管理update-rc.d
计算机在启动的时候会自动执行一些脚本,用于启动一些应用程序服务,update-rc.d 是管理这些脚本的常用命令之一. 首先这是 LinuxQuestions 中对 update-rc.d 的定义: ...
- VS2010 lib和dll导出路径设置
创建库文件工程时往往需要设置.lib文件和.dll文件的路径. 假设一个solution对应了多个工程,然而他们共用一些库,就可以在solution文件夹下分别添加两个文件夹lib和bin(其实放在一 ...
- Ubuntu下,terminal经常使用快捷键
# ctrl + l - 清屏 . cLear # ctrl + c - 终止命令. # ctrl + d - 退出 shell,好像也能够表示EOF. # ctrl + r - 从命令历史中找 . ...
- fisheye Error occurred during initialization of VM Could not reserve enough space for object heap 问题解决!
参考文章:https://answers.atlassian.com/questions/9397/not-enough-heap-space-to-run-fisheye fisheye下载好了之后 ...
- STAF进行分布式脚本分发----实践篇
该博文理论支持文章:http://www.cnblogs.com/zhangfei/p/3169139.html 一.准备条件 1.安装STAF.由于其官网被墙了,所以大家可进入WAT群的网盘里去下载 ...
- 【java】详解集合
目录结构: contents structure [-] 集合概述 什么是集合 Collection和Map的区别 List和Set的区别 ArrayList和LinkedList的区别 HashSe ...
- Win7系统计算机中Msvcr100.dll丢失的解决办法
1.使用安全卫士里的人工服务. 在搜索框里输入msvcr100.dll. 点击查找方案. 2.点击msvcr100.dll问题后面的立即修复. 只要等待片刻就好了.