混帐和删除文件 [英] git and removing files

查看:103
本文介绍了混帐和删除文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是从工作树中删除文件的唯一方法,让git注意到它,并在未来的HEAD中加入这个更改是使用 git rm

我只是想确定。我现在一直在使用常规的bash'rm',而git从来没有选择那些文件/目录删除,并且这是为什么它不是。

解决方案

是的,您必须使用 git rm 源代码管理,您可以看到 man 页面了解更多详情。

Is the only way to remove files from a working tree, have git notice it and incorporate that change in future HEADs is to use git rm?
I just want to be sure. I've been using regular bash 'rm' for a bit now and git is never picking up on those file/dir deletions and it was bugging me why it wasn't.

解决方案

yes you have to use git rm to remove them from the source control, you can see the man page for more details.

这篇关于混帐和删除文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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