从目录中删除所有的git文件? [英] Remove all git files from a directory?

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

问题描述

我有一个版本控制下的文件夹。我想制作一份副本来发送,但不希望包含所有.git目录及其下的文件。

I have a folder under version control. I want to make a copy of it to send around, but don't want to include all the .git directories and the files underneath it.

有没有办法删除所有的git文件,而不是手动删除所有的git文件?

Is there a way to remove all the git files instead of manually deleting all of them?

推荐答案

.git文件夹只存储在repo的根目录中,而不是像subversion那样的所有子目录。你应该只能删除那个文件夹,除非你使用Submodules ...那么他们也会有一个。

The .git folder is only stored in the root directory of the repo, not all the sub-directories like subversion. You should be able to just delete that one folder, unless you are using Submodules...then they will have one too.

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

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