如何在不从磁盘中删除文件的情况下对其进行混淆? [英] How do I git rm a file without deleting it from disk?

查看:60
本文介绍了如何在不从磁盘中删除文件的情况下对其进行混淆?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

该命令删除我的系统中的文件。我的意思是它只从Git-repository中删除文件。



如何在不删除系统中的文件的情况下从Git存储库中删除文件?

解决方案

根据git help rm,

  git rm  - 缓存文件

应该做你想做的事。 p>

The command removes the file in my system. I meant it to remove only the file from Git-repository.

How can I remove the file from a Git repository, without removing the file in my system?

解决方案

According to "git help rm",

git rm --cached file

should do what you want.

这篇关于如何在不从磁盘中删除文件的情况下对其进行混淆?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆