将文件移出版本控制 (Revision Control)
两条重要的 Git 命令:
git rm -r -n --cached /path/to/the/directory
git rm -r --cached /path/to/the/directory
The git rm command removes files from the index, or from the working tree and the index. git rm will not remove a file from just your working directory. (There is no option to remove a file only from just your working tree and yet keep it in the index; use /bin/rm if you want to do that.) The files being removed have to be identical to the tip of the branch, and no updates to their contents can be staged in the index, though that default behavior can be overridden with the -f option. When --cached is given, the staged content has to match either the tip of the branch or the file on disk, allowing the file to be removed from just the index.
-n, --dry-run
Don’t actually remove any file(s). Instead, just show if they exist
in the index and would otherwise be removed by the command.(excerpted from the man page of git-rm.)
将文件移出版本控制 (Revision Control)的更多相关文章
- 版本控制 version control和团队协作
这些技术你可能暂时不会用到,但是一旦软件体量变大,开发人数增加,这就带来质变,需要借助一些工具或者技术才能完成这些复杂的工程. 你可以从最简单的情况思考,你可以对任何类型的文件进行版本控制,比如一个p ...
- 代码版本控制[version control]之Git
如何多人协同开发同一个项目? 使用代码版本控制[version control]软件, 目前市面上比较流行的代码版本控制器有: git,svn,csv 1. 使用git管理代码版本 本项目使用git管 ...
- js文件的版本控制
使用grunt完成requirejs的合并压缩和js文件的版本控制 最近有一个项目使用了 requirejs 来解决前端的模块化,但是随着页面和模块的越来越多,我发现我快要hold不住这些可爱的j ...
- SVN忽略已提交的文件(ignore,移出版本控制)
本文适用于已安装TortoiseSVN客户端的同学. 1.右键点击要忽略的文件夹或文件,鼠标移到“TortoiseSVN”,找到“Unversion and add to ignore list”,选 ...
- 版本控制——Version Control
版本控制是指对软件开发过程中各种程序代码.配置文件及说明文档等文件变更的管理,是软件配置管理的核心思想之一. 版本控制最主要的功能就是追踪文件的变更.它将什么时候.什么人更改了文件的什么内容等信息忠实 ...
- git把某个文件去除版本控制
谢谢@jessicway 同学的提醒.我之前没考虑只需要删除服务器上已提交的文件,但是本地不想删除的情况. 我们先看看 git rm 命令的说明 可以看到其实加上 --cached 参数就可以实现只去 ...
- git如何移除某文件的版本控制
1:还没有加到版本控制中 (1)还没有git add 在 .gitignore中添加 (2)已经git add 先 git rm -r --cached 文件 在 .gitig ...
- 让git忽略ignore所有文件,只对某些文件进行版本控制
*.c !frob_*.c !custom.c 或者:*!*/ # 这个的意思是不忽略目录.否则目录被忽略了之后,它里面的所有文件都忽略了!*.c!*.cc!*.cpp!*.cxx 也就是先忽略所有文 ...
- 使用grunt完成requirejs的合并压缩和js文件的版本控制
最近有一个项目使用了 requirejs 来解决前端的模块化,但是随着页面和模块的越来越多,我发现我快要hold不住这些可爱的js文件了,具体表现在每个页面都要设置一堆 requirejs 的配置( ...
随机推荐
- viewport理解
viewport预备知识 dpr === dppx dpr:device pixel ratio 设备像素比 dppx:Number of dots per px unit 每像素有多少点 . 1dp ...
- 多站点配置apache服务器
以阿里云服务器为例,使用的是阿里云web一键安装包 目录: /alidata/server/httpd-2.4.10/conf/extra 代码内容: <VirtualHost *:80> ...
- oracle 自增长序列
create or replace TRIGGER "METTINGUSER".TRG_PREPN BEFORE INSERT ON "PREPROJFUN" ...
- Linux 下dns的搭建
1.软件安装: redhat默认使用bind作为安装软件 使用yum安装 yum install -y bind bind-chroot bind-utils bind提供主程序 bind-chroo ...
- getopt,getoptlong学习
getopt和getoptlong被用来解析命令行参数. 一.getopt #include <unistd.h> extern char *optarg; extern i ...
- shell脚本批量收集linux服务器的硬件信息快速实现
安装ansible批量管理系统.(没有的话,ssh远程命令循环也可以) 在常用的数据库里面新建一张表,用你要收集的信息作为列名,提供可以用shell插入.
- Usual tiny skills & solutions
Ubuntu and Win10 - double OS 2016-02-21 Yesterday I helped my friend install Ubuntu (14.04 LTS) on h ...
- NYOJ----776删除元素
删除元素 时间限制:1000 ms | 内存限制:65535 KB 描述 题意很简单,给一个长度为n的序列,问至少删除序列中多少个数,使得删除后的序列中的最大值<= 2*最小值 输入 多组测 ...
- Openvpn 撤销签署的证书(删除用户)
https://wiki.archlinux.org/index.php/Easy-rsa Revoking certificates and alerting the OpenVPN server ...
- linux查看主板型号及内存硬件信息
公司服务器内存不够用了. 想看看买啥型号的. 购买内存条注意点: ddr3 or4 频率 块钱. 内存槽及内存条: dmidecode |grep -A16 "Memory Device ...