In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "what are the common nouns of Git". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "what is the common noun of Git"?
Working space/working tree
Current workspace
Index/stage
Temporary storage area
After the content has been modified in the workspace, you can submit the modification information to index/stage with the git add/git stage command.
Commit/revision
In the final save area, you can create a new revision/commit to save the modification information in the index/stage with the git commit command.
Remote
Remote warehouse
Revision/commit history
Each branch of the Git library has a stack for holding the revision/commit, called revision/commit history
Each time you commit changes with the commit command, a new revision/commit is created at the top of the revision/commit history of the current branch to save the submitted changes.
History head
The revision/commit at the top of a revision/commit history is called the head (header) of the revision/commit history.
Base directory
Create a new Git library in the normal way, that is, execute the git init command in an empty directory
A .git folder is automatically generated under the current directory to save objects, references, etc., other than the contents of the workspace.
In Git libraries created or cloned by other means, these contents may be saved with other directories instead of .git directories.
Whether it is the .git directory of the ordinary Git library or its substitute in the special Git library, it is collectively referred to as the base directory (base directory) of the Git library to which they belong.
Revision/commit hash
Like name and id, which are common in programming, hash in Git is a symbol that represents an object.
We can simply understand revision/commit hash as the id of revision/commit.
However, unlike ordinary name or id, hash in Git is a checksum value calculated by SHA algorithm from the data of the object it represents.
For SHA algorithm and checksum, please refer to the general explanation of common programming terms.
Reference
Can be simply understood as a pointer variable in the Git version.
All the objects in Git are files saved on the hard disk. Some files store data contents, while some files only store paths to other objects, hash, and so on. The abstract object corresponding to this kind of file is called reference (reference).
Just as pointer variables can point to other pointer variables, there are references to other references in Git
All references in the current Git library are saved in the refs directory under the .git directory or other form of base directory.
HEAD
A predefined reference to Git, which by default points to the history head of the current branch
The master file in the refs/heads directory is the HEAD file of the main branch, where the hash of the history head of the main branch is saved.
If a Git library has multiple branches, each branch will have a HEAD file that belongs to it in the refs/heads directory
These HEAD files have the same name as the branch to which they belong, and the content is the hash of the history head of the branch to which they belong
Index/stage entry
What is saved in index/stage or revision/commit in Git is not a copy of the file, but an object that records the information related to the modification of the file content.
This kind of object is called index/stage entry.
Untracked
Files that do not have entry in index/stage are called untracked (untracked) files.
Tracked
There are already entry files in index/stage called tracked (tracked) files.
Unstaged
Files that have been tracked and have changes that have not been committed to index/stage are called unstaged files.
Staged
All changes have been committed to the file in index/stage, called the staged file.
Commit/revision message
Namely commit/revision description information
Submit changes to commit/revision by default, that is, when the git commit command is executed
Git will open a text editor and let the user enter a piece of information describing the modification.
This information will be saved in the corresponding commit/revision object together with this modification.
Git profile
There are three levels of configuration files in Git:
Git/etc/gitconfig: the configuration file under the Git installation directory Git, called the global configuration file
Home/user_name/.gitconfig: the configuration file under the user home directory home/user_name, called the user profile; the user home directory under the Windows system is specified by the HOME variable in the user environment variable
.git / config: the configuration file under the base directory of the Git library, called the library configuration file
The global profile has the largest scope and is valid for all libraries, but has the lowest priority, and both user profiles and library profiles can override its configuration
The user profile is valid for all Git libraries created by the current user, with higher priority than the global profile and lower priority than the library profile
The library profile is only valid for the current library, but has the highest priority
Commit/revision description information template file
Submit changes to commit/revision by default, that is, when the git commit command is executed
In the temporary file opened in the editor for editing commit/revision description information, the initial content generated based on the contents of the template file is displayed
The template file can be specified through the configuration variable commit.template in the Git configuration file.
At this point, I believe you have a deeper understanding of "what is the common noun of Git". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.