git log--log

Source: Internet
Author: User

1. Find a log that changes all of a file

git log--pretty=----pretty=format:"%h  %an,%cd:%s" Somefile.java

2. Formatted output, git log--pretty=format: ""

option   Description %H    Commit object (commit) full hash string %H    Commit object short hash string %T    Tree Object (tree) full hash string %T    tree object short hash string%p    Parent object (parent) full hash string %p    Parent object short hash string% an  Author    (author) name %AE    author's e-mail address %ad    Author revision date (can use-date= option custom format)% ar     Author revision date, as of how long ago display %cn    Submitter (committer) name %CE    Submitter e-mail address %CD    Submission Date %CR    Submission Date, as of how long ago display %s    submission Description

git log--pretty=format:"%h  %an,%cd:%s"

3. Specify date, keyword, author

--since,--              after only the commit after the specified time is displayed.              git log--since=2.days--until,--before             only shows the commit before the specified time .              git log--until=10.days-author                      only shows the commits that are related to the specified author .              git log--author=beginman--committer                   shows only the commits associated with the specified submitter .             git log--committer=jack

--grep displays only the commits for the specified keyword . git log--grep=init

Note the author's relationship with the submitter: the author is the person who modified the program, and the submitter is the code author.

As specified 2 days ago, the author "Beginman" commits the first 2 entries containing the keyword ' init ': $ git log--since=2.days--author=beginman--grep=init-2

Note: The parameters following the above options can be enclosed with single double quotes, such as--author= "Beginman"

4. Display the modified file

--name-                       only displays the list of modified files after the information is submitted
--name-status Show List of new, modified, deleted files
git log--name---name-only----name---name-status--oneline

5. Display Log Statistics

--stat                      Displays the file modification statistics for each update, and also shows the updated file name and the number of modifications. --shortstat                only displays--the last number of rows in thestat modifies the added statistics. The updated file name is not displayed.
Git log--stat--stat ------shortstat--oneline

6. Show single-day log information

Show ID Show ID]--name-showID]--name-only-showID]--name-show ID]--statshowID]--shortstat

git log--log

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.