Git serialization (5) View the version change of a file or directory

1.8.5 View the version change of a file or directory

        TortoiseGit can also view the version change history of files and folders, and compare the differences between any two versions.

        It is very simple to view the version change history of a file or folder. Right-click in the blank space of the G:\gitJava directory, and click the menu item "ToitorseGit" → "Show log" in the pop-up menu, and you can see as shown in Figure 1.72. The version change history shown.

Figure 1.72 View file version changes

        As can be seen from Figure 1.72, Git will centrally manage the version changes of the entire project: we select a commit at the top of the dialog box, and in the middle of the window, we can see the unique identifier of this commit (represented by the SHA-1 name) and the current Submitted description information; at the bottom of the window, you can see the files involved in this submission: for example, Figure 1.72 selects the add operation for the first submission, and in this window, you can see that WEB-INF/web.xml is added to this submission operation And a.jsp two files.

        Tip: You can also view the version change history through the git log command. This command will display the version change history of the repository in a text interface. The text interface is not as intuitive as the one shown in Figure 1.72.

        Many of TortoiseGit's "undo" operations can be done through the interface shown in Figure 1.72. For example, right-click the mouse on the a.jsp page, and you can see the dialog box shown in 1.73 pops up.

Figure 1.73 View the version changes of a file

        The first three menu items of the menu shown in Figure 1.73 are mainly used to compare the file of this version with other versions (check which modifications have been made, and the modified parts will be highlighted); the menu items in the middle part are mainly used to compare the files of this version with other versions. To perform an operation on the current version, such as returning to this version, you can click the "Revert to this revision" menu item; for example, to save the version file as, you can click the "Save Revision to..." menu item.

This article is adapted from the Crazy Java Forum: http://www.crazyit.org/forum.php

Spring Cloud teaching video: https://my.oschina.net/JavaLaw/blog/1552993

JD.com purchase address: https://item.jd.com/12256011.html

Workflow Activiti teaching video: https://my.oschina.net/JavaLaw/blog/1577577

Activiti6 purchase address: https://item.jd.com/12246565.html

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325330637&siteId=291194637