Git view submission history

Source: Internet
Author: User
Git: view the submission history. this is an operation with a very high level in git. it also has powerful functions to view the submission history in git and provides various filtering and output format customization functions. The simplest way is to run the gitlog command. you will see a detailed commit log: git-log #. of course, you can only query it... git: view the submission history. this is an operation with a very high level in git. it also has powerful functions to view the submission history in git and provides various filtering and output format customization functions. Run the git log command, and you will see a detailed commit log: git-log # of course, you can only view a certain version of $ git log fd0a1b2, this is the 40-character string after the first line of commit. this is the corresponding SHA-1 value for this commit. in git), directory (tree), label (tag) to generate a unique SHA-1 value, git is based on this to learn the file or directory changes, because the SHA-1 values calculated by these four types of objects are unique, you can also directly use the SHA-1 value to refer to the corresponding objects. For example: $ git show bdd3996 # view a specific file in a specific version $ git show bdd3996 READMEgit log there are many command options to customize the description of the history option-(n) show only the last n submitted-since,-after only show the submitted-until after the specified time, -before only displays submissions before the specified time-author only displays submissions related to the specified author-committer only displays submissions related to the specified submitter-reverse in reverse chronological order-p shows each submission in patch format differences between updates-stat displays the statistics of file modifications updated each time-statistics stat only displays the last row modifications In-stat add remove Statistics-name-only displays the modified information after submission -name-status: displays the list of newly added, modified, and deleted files-abbrev-commit only displays the first few characters of SHA-1, not all 40 characters-relativ E-date uses a relatively short relative time display (for example, "2 weeks ago")-graph displays the branch merge history represented by the ASCII image-pretty displays historical submission information in other formats. Available options include oneline, short, full, fuller, and format (followed by the specified format). you can combine these options to customize more personalized log information, for example: $ git log -- committer 'God' -- cmdstat -- pretty = oneline this command displays statistics submitted by god in single-line mode. $ Git log-p-5: displays the last five commits and shows their differences. In addition, git log-graph is also fun. I used git log-graph to view the git project log, which is very spectacular. Git graph log-pretty = format introduces the-pretty = format option separately. You can use formats and placeholders to customize a more personalized display format. Option Description % H submit the complete hash string of the object (commit) % h submit the brief hash string of the object % T tree object (tree) full hash string % t tree object's short hash string % P parent object (parent)'s complete hash string % p parent object's short hash string % an author (author) email address of name % AE author % ad author Revision date (you can use the-date = option to customize the format) % ar author revision date, how long ago is the % cn submitter name % ce submitter's email address % cd submission date % cr submission date displayed, how long ago % s commit instructions $ git log -- pretty = format: '% h by % ce at % CD' this command will display logs in the format of "brief SHA-1 by submitter at submission time"

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.