Don't look at the GIT version history? favorite this tool

If you want to see the version evolution history of git, you can do this:

Open Git Bash and switch to the project directory

$ pwd

$ ll

$ cd git-rainbow/

$ ll

$ cd mtxcrm/

$ ls -la

In addition to the command line method, there is a more intuitive way to view the git version history through a graphical interface tool.

Enter the following command to open the git historical version graphical interface management tool

$ gitk

picture

The git version history graphical interface tool is divided into upper and lower areas, as shown in the following screenshot:

insert image description here

The upper left corner is the history tree

Click on any node in the directory tree, which has the same background color as the node, and the upper right area is the specific commit information. The two lists on the right list the author information and change time respectively.

insert image description here

When there is a lot of version history information, especially when there is a lot of branch information, it seems easy to get confused. Let's go through each block one by one. As we click on different directory tree nodes, the following ID information is also changing

insert image description here

insert image description here

In addition, the information of Diff and Tree also changes

insert image description here

In the lower right area, in addition to clicking Tree, you can also click Patch. Patch refers to the change set corresponding to a certain change

insert image description here

The Diff corresponding to the lower left of the Patch is an enumeration of the change information of all the changed files in the Patch change set.

insert image description here

Switch to Tree, you can see the file directory structure under the current commit project

insert image description here

In addition to the different display forms, in Tree mode, when a file is selected, the entire content of the file is displayed in the Diff on the lower right.

insert image description here

In Patch mode, the Diff area on the lower left tells us what content has been added to this file through the + plus sign

insert image description here

When viewing the version history through the gitlog command before, there was only the author's information. Our gitk not only has Author author information, but also Committer committer information. Is there any difference between the two?

insert image description here

The commit of a certain change has both Author author and Committer committer. Is there any difference between Author author and Committer committer? Just think, under what circumstances are authors and committers different?

For example, there is a commit in the master branch, I pick it out and put it in the temp branch, that is to say, if a branch is picked out and put into another branch, the author and the committer may be different at this time. That is to say, there is an author before the pick, and the committer corresponding to the newly generated commit is yourself, but the content is picked from other branches, that is, git cherry-pick, I pick other people's branches myself Come over and submit in the new branch. At this time, the author still retains the author before picking, that is to say, in this case, the author author and the committer submitter are two different accounts.

insert image description here

And every change, usually with a parent parent, except which one doesn't have a parent parent?

insert image description here

The following node has only Child children and no parent Parent. Because it is the first commit in this repository. It has no parent, which means it has no parent, it only has a child, Child.

insert image description here

Then there are Branches, which refers to which Branches branches contain this commit

insert image description here

In addition, gitk also has a function, that is, you can customize the content of the view, click the menu item "View" > "New View" in turn

insert image description here

In the following view definition window Gitk view definition, check All refs all references.

What are all citations?

Including all (local) branches all local branches, All tags all tags, All remote-tracking branches all remote branches, All tags All tags refer to the marked branches.

Then click [Apply], [OK] in the window.

insert image description here

All of our current git operations are performed locally and do not involve remote situations.

That is to view the git version history on your own work machine. As shown in the screenshot below, we can get all the branches information

insert image description here

You can also click a commit message in the upper left directory tree, right click "Create tag" to add a tag

insert image description here

In the create tag pop-up window maketag, enter information in the tag name and message text boxes respectively, and click [Create]

insert image description here

As shown in the screenshot below, the original node name is replaced by the label name

insert image description here

Je suppose que tu aimes

Origine blog.csdn.net/Testfan_zhou/article/details/124313604
conseillé
Classement