简体   繁体   English

文件.git和目录.git有什么区别?

[英]What is the difference between file .git and directory .git?

I had a git submodule and I was in need to add some pre-commit operations, so i searched for the directory .git to find the hook and so on. 我有一个git子模块,需要添加一些预提交操作,因此我搜索了目录.git来找到该钩子,依此类推。 Instead of the directory i found only a file 而不是目录我只找到一个文件

.git

So, i was guessing what does this means? 所以,我猜这是什么意思? (in order to start understanding what exactly i messed up fetching the submodule) (为了开始理解我到底弄错了什么来获取子模块)

I tried searching but cannot find something useful to understand what is going on. 我尝试搜索,但是找不到有用的信息来了解正在发生的事情。

The .git/ folder contains the development history of you project and is located in your project's root directory. .git/文件夹包含您的项目的开发历史,并且位于项目的根目录中。

The .git file is located in your submodule's root directory and contains the path to the .git/ directory associated with this submodule (located in your project's .git/modules/ directory) .git文件位于子模块的根目录中,并包含与此子模块关联的.git/目录的路径(位于项目的.git/modules/目录中)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM