问题描述
我试图学习git。
我读了几篇教程。
见下面的定义:$ b $在任何地方,我都对这个词的实际意义感到困惑,它叫做'Repository'。
所以,我的问题是,包含整个目录项目(即我的项目中的所有文件)以及 .git
目录(通常默认隐藏)称为存储库我的项目文件夹中存在的 .git
文件夹称为存储库?
我相信两者都是正确的。
在,它说:这将我们引导到Git项目的三个主要部分:Git目录,工作树和中场区。有一张图片显示.git directory(Repository)。从这里我们可以说一个仓库是 .git
,其中Git存储项目的元数据和对象数据库。
但是,有证据证明存储库包含多于 .git
。一个Git仓库可以是裸露或非裸露的。什么是裸仓库?这是。因此,非裸仓库包含一个工作目录。另外,我们来看一下Git子模块。什么是子模块? 。裸存储库不能作为子模块添加。并且添加子模块的操作必须位于超级项目的工作树中。
至于工作目录和工作树之间的区别,这是另一回事。有。
I'm trying to learn git.
I read few tutorials. Everywhere I got confused with the actual meaning of this term called 'Repository'.
See the below definitions :
So, my question is whether the directory which contains entire project (i.e. all the files of my project) along with the .git
directory (usually it's hidden by default) is called the Repository of only the .git
folder present within my project folder is called the Repository?
I believe both are right.
In Pro Git, it says, "This leads us to the three main sections of a Git project: the Git directory, the working tree, and the staging area." There is a picture which says ".git directory (Repository)". From this we can say a repository is .git
, where Git stores the metadata and object database for your project.
However, there is evidence that proves a repository includes more than .git
. A Git repository can be either bare or non-bare. What is a bare repository? It is a repository that doesn’t contain a working directory. So a non-bare repository contains a working directory. Besides, let's take a look at a Git submodule. What is a submodule? A submodule is a repository embedded inside another repository. A bare repository can't be added as a submodule. And the operation to add a submodule must be in a work tree of the super project.
As to the difference between a working directory and a work tree, it's another story. There are some answers.
这篇关于git中的术语库究竟意味着什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!