.git文件夹不包含什么? [英] What does the .git folder not contain?

查看:116
本文介绍了.git文件夹不包含什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

git网站(重点是我):

From the git site (emphasis mine):

当您在新目录或现有目录中运行git init时,Git会创建 .git目录,它是几乎 Git存储的所有内容以及 操纵位于.如果您要备份或克隆您的 存储库,将此单个目录复制到其他位置将使您快要 您需要的一切.

When you run git init in a new or existing directory, Git creates the .git directory, which is where almost everything that Git stores and manipulates is located. If you want to back up or clone your repository, copying this single directory elsewhere gives you nearly everything you need.

他们几乎"和近乎"地潜入了那里,而无需进行详细说明. .git目录中没有什么 ?如果要备份或克隆存储库,将单个目录复制到 not 不会给我什么?

They sneak "almost" and "nearly" in there without elaborating. What isn't located in the .git directory? If I want to back up or clone my repository, what does copying that single directory elsewhere not give me?

推荐答案

Git不记录:

  • 文件组
  • 文件所有者
  • 文件权限(此可执行文件除外")
  • 扩展属性
  • 空文件夹
  • (.gitignore中的任何内容,但这可能是需要的)
  • gitmodules
  • file groups
  • file owners
  • file permissions (other than "is this executable")
  • extended attributes
  • empty folders
  • (anything in .gitignore, but that's probably desired)
  • gitmodules

这篇文章可能会为您提供更多见解

Probably this post can provide you more insights

这篇关于.git文件夹不包含什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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