Git using the three ——. git folder detailed _git learning

Source: Internet
Author: User

Git uses one of the basic uses of--git
Git uses the second ——. Gitignore file detailed
Git using the three ——. git folder detailed
The installation of the GitHub desktop version of Git using the quad--windows
Git uses the five--github to keep the fork project synchronized with the original project
Git uses the six--github work together Fork+pull Request
Git uses the seven--android studio under the proper use of git. Git folder

. The Git folder is a folder for managing Git warehouses that was generated in the current directory after Git init, and contains all the things that are required for GIT operations, see:

Let's go over the details of what is hidden in this area. Introduced

1 hooks: This directory holds a number of shell scripts that can be set to trigger the corresponding script after setting a specific git command, and the hook script is often used to build the gitweb system or other git hosting systems.

2 Info: Contains some information about the warehouse

3 logs: Save all updated reference records

For example, there is a head file, which looks like this:

4 objects: This directory holds all Git objects, the first two bits of the object's SHA1 hash value are the folder names, and the last 38 bits are the object file names.

For example, the head file in the front log has a hash value of 5426426E3CCC9AB4E3330640862A7B96E28828AF.

We found 54 folders, open, this way:

5 Refs: Specific references, Reference specification, this directory generally includes three subfolders, heads, remotes and tags, for example, The master file in heads identifies the current commit, other similar, that the master branch in the project points to.

6 Commit_editmsg: Save the latest COMMIT Message,git system will not use this file, just give the user a reference

7 Config: This is the config file for the Git warehouse

8 Description: Warehouse description information, mainly to Gitweb and other git managed system use

9 Index: This file is the registers (stage) that we mentioned earlier, is a binary file

Head: This file contains a reference to a branch (branch), through which git can get the next commit's parent, what is a reference, you can understand as a pointer, where can be pointed, but can not point to the things oh. For more information please look here:
Git uses one of the basic uses of--git

Because Git is indexed according to the hash value, the computer handles this in a way that is convenient for us to use, so the concept of references appears, and the branch name, remote branch name, tag, and so on in the GIT system are references to a commit. such as the Master branch, the Origin/master remote branch, and tag, named V1.0, are references that point to a commit by the SHA1 hash of the saved commit.

One orig_head:head the previous state of the pointer

Here should have a very deep understanding of this, you open each one to see, it will be more in-depth, thank you.

Enjoy

Yue share, the happier ^_^

Welcome to Exchange, reprint please indicate the source, thank you.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.