git use manual/git tutorial: Git reflog Use, view historical version records __git

Source: Internet
Author: User
Tags diff git clone
Related articles:For a way to verify that an SSH configuration exists and generate an SSH key, refer to the article: Git usage manual: Generate SSH key for SSH key usage and public key in GitHub, Gitlab configuration, please refer to article: Git usage manual: Use SSH key and configure SSH Key public key on the concepts and relationships of Git workspaces, registers, local warehouses, and remote warehouses, please refer to the article: Git manuals: workspaces, registers, local warehouses, remote warehouses about git downloading items from a remote repository to a local workspace, see article: Git manual: Git Clone Clone download Remote warehouse Project project to local workspace For more information about GIT branch use, please refer to article: Git Manual: Git branch Branch operations, create a branch, view a branch, delete a branch, delete a local branch, delete a remote branch

For the use of Git checkout, please refer to the article: Git manual: Git checkout Create branches, toggle branches

For an explanation of the git status command, please refer to the article: Git manual: Git status View changes to files in the local workspace, registers

For the use of Git diff and git add commands, please refer to the article: Git Usage manual: Git diff, git Add, git diff--cached command details

For a detailed explanation of git commit commands, please refer to the article: Git manual: Git commit-m/-am/-a-m submit files to local warehouse area

For a git fetch command, refer to the article: Git manual: Git fetch pulls the latest version of the branch and branch of the remote warehouse to the local

For more information about git pull command use, please refer to article: Git manual: Git pull origin pull substitution code to local, resolve file conflicts when pulling out code

For the git push command use, please refer to article: Git manual: Git push forward submit local warehouse code file to remote warehouse
about git log command use, please refer to article: git use manual/git tutorial: Git log View git submit version history logging

Git reflog can view all of the operations records for all branches (including commit, rollback, deleted commit action records, and so on). 1 View History version record command: Git reflog: View submit version history after executing the command as shown in figure:
as you can see from the diagram, a lot of row records appear after you execute the command. Each line of records consists of a version number (commit ID SHA), a head value, and an operation description. The version number is in the first column, the head value is in the second column, and the operation description information is in the third column. Version number: Previously mentioned, the version that identifies each operation, such as commit, merge, and so on, is equivalent to uniquely identifying the head value: The same is used to identify the version, but unlike the version number, the head value is relative. When the head value is head, it is represented as the latest version of the submission; head^ is represented as the last version of the latest version; head^^ is represented as the last version of the latest version; head~100 is the latest version of the 100th version. The smaller the head value, the newer the version, the greater the longer the build time. In the image above, we find that the head value is displayed in Head@{0}, Head@{1}, head@{2} ... The smaller the number of the same head value, the newer the version, the larger the number indicating the older the version. Description of operation: This is a record of what kind of operation, as well as the operation of the description of the information written. 2 View history version record--Specify the number of display bars
Also, as with git log, git reflog has the option to control the number of display bars: command: Git reflog-n  after executing the command as shown in figure:
Here, set the number of display bars to 10, After the command is executed, the number of bars displayed is 10 of the specified number of bars.





If you have other questions, you want to be able to communicate through the form of a message in a timely manner, there are written errors and can be optimized places also hope to make timely, 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.