Introduction
On this page
Introduction (简介)
In this chapter, you will learn how to examine Git repository with the help of several commands. The section will cover everything related to the state of the working directory and the staging area, references displaying particular points in Git history, display of author metadata attached to the specific committed lines, and the committed snapshots. The commands needed for examining Git repository are briefly described below. Find detailed information on our next pages. (在本章中,您将学习如何在几个命令的帮助下检查Git存储库。本节将涵盖与工作目录和临时区域的状态相关的所有内容、显示Git历史记录中特定点的引用、附加到特定提交的行的作者元数据的显示以及提交的快照。下面简要介绍了检查Git存储库所需的命令。有关详细信息,请参阅我们的下一页。)
git status
git status
The git status command displays the state of the working directory and the staging area allowing to see the staged changes and the files that aren’t being tracked by Git. The Status output does not display any information about the committed project history.
git log
git log
The git log command is a tool used for examining a repository’s history and finding a particular version of a project. The git log command displays committed snapshots. It is used for listing and filtering the project history, and searching for particular changes. It only operates on the committed history.
git tag
git tag
Tags are references that display particular points in Git history. The main function of tagging is to capture a point in a Git history that marks version release. Tags don’t change. After a tag is created, it has no history of commits. (标签是显示Git历史记录中特定点的引用。标记的主要功能是捕获Git历史记录中标记版本发布的点。标签不会更改。创建标记后,它没有提交历史记录。)
git blame
git blame
The git blame command is a flexible tool. The most important function of it is the display of author metadata attached to a particular committed line in a file. It is used for exploring the file history and finding out the last author who modified the line.