git log to view the commit history of the current branch

Source: Internet
Author: User

git log View the commit history of the current branch

After submitting a number of updates, to review the commit history, you can use the git log command to view

By default, git log all updates are listed by time of submission, and most recent updates are on top. See, each update has a SHA-1 checksum, the author's name and e-mail address, the time of submission, and the final indentation of a paragraph showing the submission instructions.

git logThere are many options to help you search for interested submissions, so let's introduce some of the most common ones.

We use the -p option to expand the display of content differences for each commit, with -2 only the last two updates displayed :

$ git log-p-2

In addition, there are a number of summary options that --stat can be used, for example, only a brief display of the number of row count statistics, each submission lists the modified file, and the number of rows added and removed in it, and the last list of all the increment and decrement line count subtotals.

$ git log--stat

--author displays only the commits associated with the specified author.

$ git log--author=haiwang

Find the version submitted by Haiwang;

git log to view the commit history of the current branch

Related Article

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.