1.git initialize a new warehouse
command:
git init
Analysis:
To start using Git to manage an existing project, just go to the directory where the project is located and execute: git init
effect:
After initialization, a directory named .git will appear in the current directory, and all the data and resources needed by Git are stored in this directory. However, at present, all the files and directories have been initialized according to the existing structural framework, but we have not yet begun to track and manage any files in the project.
2.Git directory introduction
The hooks directory contains client or server hook scripts;
info contains a global exclusion file
logs save log information
The objects directory stores all data content;
The refs directory stores a pointer to the commit object of the data (branch)
The config file contains project-specific configuration options
description is used to display the description of the warehouse
The HEAD file indicates the branch that is currently checked out
The index file saves the temporary storage area information (this file did not exist when the version library was just initialized)