{"id":17411,"date":"2020-11-23T01:25:32","date_gmt":"2020-11-23T09:25:32","guid":{"rendered":"https:\/\/careerkarma.com\/blog\/?p=17411"},"modified":"2023-12-01T04:04:51","modified_gmt":"2023-12-01T12:04:51","slug":"git-log","status":"publish","type":"post","link":"https:\/\/careerkarma.com\/blog\/git-log\/","title":{"rendered":"Git Log: How to Use It"},"content":{"rendered":"\n<p><em>The git log command displays a record of the commits in a Git repository. By default, the git log command displays a commit hash, the commit message, and other commit metadata. You can filter the output of git log using various options.<\/em><\/p>\n\n\n\n<p>Version control systems have one core purpose\u2014to record how your codebase evolves over time. This allows you to see how your projects have progressed. You can find out who has contributed to your project and identify what changes have been made to your code and when.<\/p>\n\n\n\n<p>But how do you actually view the history your Git repository creates? That\u2019s where the git log command can be helpful.<\/p>\n\n\n\n<p>This tutorial will discuss, with examples, the basics of the git log command and how you can use it to inspect a Git repository.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The git log Command<\/h2>\n\n\n\n<p>The git log command shows a list of all the commits made to a repository. You can see the hash of each <a href=\"https:\/\/careerkarma.com\/blog\/git-commit\/\">Git commit<\/a>, the message associated with each commit, and more metadata. This command is useful for displaying the history of a repository.<\/p>\n\n\n\n<p>Whereas the git status command is focused on the current working directory, git log allows you to see the history of your repository.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">git log Command Example<\/h2>\n\n\n\n<p>Let\u2019s walk through an example to illustrate how the git log command works. We have been working on a repository called \u201cdemo-repository\u201d. Now we want to see a list of all the commits we have pushed to our repository. To do so, we can use this command:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>git log<\/pre><\/div>\n\n\n\n<p>The git log command returns a list of all commits made in a repository. Here\u2019s an example of a single commit returned by this command:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>commit 43433c674e3d6c86a889fad222dae179785893cf (HEAD -&gt; master, origin\/master, origin\/HEAD)\nAuthor: James Gallagher &lt;37276661+jamesgallagher432@users.noreply.github.com&gt;\nDate:   Tue Apr 7 13:09:58 2020 +0100\n\n    Update index.html<\/pre><\/div>\n\n\n\n<p>Let\u2019s discuss this output step-by-step. Each entry returned by the git log command contains:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>The Secure Hash Algorithm (SHA) hash for the commit, which is used to uniquely identify each commit in a repository. In our above example, this was \u201c43433c674e3d6c86a889fad222dae179785893cf\u201d.<\/li><li>The author of the commit. In our above example, this was James Gallagher. The email of the author is also specified.<\/li><li>The date the commit was pushed. In our above example, this was Tuesday, April 7th.<\/li><li>The message associated with the commit. The commit message returned above was &#8220;Update index.html&#8221;.<\/li><\/ul>\n\n\n\n<p>All this data gives us useful information about the commits in our repository.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Filtering the Output of git log<\/h2>\n\n\n\n<p>By default, git log returns a list of all the commits made to a repository using this structure. As you can imagine, it can quickly become difficult to read your git log statements if there are many commits to read.<\/p>\n\n\n\n<p>git log comes with a few flags you can use to filter your logs. These are:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Filter by Most Recent<\/h3>\n\n\n\n<p>If you want to return a specific number of commits, you can do so using the -n flag. Here\u2019s an example of this flag in action:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>git log -n 3<\/pre><\/div>\n\n\n\n<p>This command returns a list of the three most recent commits made to a repository.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Filter by Author or Committer<\/h3>\n\n\n\n<p>You can also filter the commits returned by git log by the person who wrote or committed the changes. Suppose we want to see a list of commits pushed by \u201cJohn Smith.\u201d We can do so using these commands:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>git log --author=&quot;John Smith&quot;\ngit log --committer=&quot;John smith&quot;<\/pre><\/div>\n\n\n\n<p>The author flag limits the results to commits whose changes were made by John Smith. The committer flag limits the results to the commits that were actually committed by that individual.<\/p>\n\n\n\n<p>You will find that, in most cases, the author and committer are the same individual. In larger projects, the author of a commit may not necessarily be the one who pushes it to a repository. This is why these two flags exist.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Filter by Date<\/h3>\n\n\n\n<p>In addition, you can filter the results of git log by date. To do so, you can use the\u2014before and\u2014after flags. These flags both accept a wide range of date formats, but the two most commonly used are relative references and full dates.<\/p>\n\n\n\n<p>Suppose we want to retrieve a list of commits from after 2019-3-2. We could do so using this command:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>git log --after=&quot;2019-3-2&quot;<\/pre><\/div>\n\n\n\n<p>We have specified a date to filter our commits. Similarly, if we want to retrieve a list of commits from before yesterday, we could do so using this command:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>git log --before=&quot;yesterday&quot;<\/pre><\/div>\n\n\n\n<p>We have specified a relative value (\u201cyesterday\u201d).<\/p>\n\n\n\n<p>Now, suppose we want to retrieve a list of commits that were published after 2019-3-2 and before 2019-3-19. We could do so using this command:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>git log --after=&quot;2019-3-2&quot; --before=&quot;2019-3-19&quot;<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Filter by File<\/h3>\n\n\n\n<p>When you\u2019re using the git log command, you may only want to see a list of commits that have affected a particular file. To do so, you can specify the file whose changes you want to see.<\/p>\n\n\n\n<p>Suppose we want to see the changes made to the \u201cmain.py\u201d file in our code. We could do so using the following command:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>git log -- main.py<\/pre><\/div>\n\n\n\n<p>The \u2014 statement instructs the git log command that the arguments we have specified are file paths and not the names of branches.<\/p>\n\n\n\n<p>In our command, we only specified one file which we wanted to use to filter the response of the git log command. But, if you want, you can specify multiple files.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Filter by Content<\/h3>\n\n\n\n<p>You can also search for commits that have removed or added a particular line of code.<\/p>\n\n\n\n<p>Suppose we want to search for all commits that have added the term \u201c# Introduction\u201d to our code. We could do so using this command:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>git log -S&quot;# Introduction&quot;<\/pre><\/div>\n\n\n\n<p>The -S flag is used to specify what commit change we want to look for in our list of commits. Notice that there is no space or equals sign between the -S flag. Also, the quotation marks that we used to specify the content of the commit for which we are looking.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Filter by Range<\/h3>\n\n\n\n<p>You can use the since and until parameters to pass a range of commits to git log. The syntax for these parameters is as follows:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>git log &lt;since&gt;..&lt;until&gt;<\/pre><\/div>\n\n\n\n<p>Suppose we want to retrieve a list of commits made since the commit b72beb5 was pushed, and until the commit b53b22d was pushed. We could do so using this command:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>git log b72beb5..b53b22d<\/pre><\/div>\n\n\n\n<p>This command returns a list of all commits between the b72beb5 and b53b22d commits.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Filter by Message<\/h3>\n\n\n\n<p>The \u2013grep flag allows you to filter the commits returned by git log by the commit message associated with a particular commit.<\/p>\n\n\n\n<p>For instance, suppose we want to return a list of all commits whose name starts with \u201cfeat:\u201d. We could do so using this code:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>git log --grep=&quot;feat:&quot;<\/pre><\/div>\n\n\n\n<p>This command returns a list of all commits whose messages start with \u201cfeat:\u201d.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Formatting the Output of git log<\/h2>\n\n\n\n<p>In the last section, we worked with a full output from the git log command. This output contained the SHA for our commit, the commit author, the date the commit was pushed, and the commit message.<\/p>\n\n\n\n<p>While all this information is useful, there are often occasions where you only need to retrieve specific data about a commit. Luckily, the git log command comes with a few flags you can use to format the output of the command.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Return Brief Logs<\/h3>\n\n\n\n<p>By default, the git log statement returns a full log entry for each commit made to a repository. You can retrieve a list of commit IDs and their associated commit messages using the \u2013oneline flag.<\/p>\n\n\n\n<p>Here\u2019s the syntax for the \u2013oneline flag:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>git log --oneline<\/pre><\/div>\n\n\n\n<p>When run in our repository from earlier, this command returns:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>43433c6 (HEAD -&gt; master, origin\/master, origin\/HEAD) Update index.html\na7d8dc2 docs: Update README.md\nb53b22d feat: Update website\n3b16026 feat: Launch new homepage\nb72beb5 first commit<\/pre><\/div>\n\n\n\n<p>We can see the commit IDs and the first line of the messages associated with a commit. This is easier to read than all of the metadata associated with a commit that the git log command would otherwise return.<\/p>\n\n\n\n<p>Each entry appears on a single line. This git log one line technique is handy because it shows commits without displaying too much information.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Decorating the Output<\/h3>\n\n\n\n<p>The \u2013decorate flag allows you to see all the references (i.e. branches and tags) that point to a particular commit. Here\u2019s the syntax for this flag:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>git log --decorate<\/pre><\/div>\n\n\n\n<p>This command returns:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>43433c6 (HEAD -&gt; master, origin\/master, origin\/HEAD) Update index.html\na7d8dc2 docs: Update README.md\nb53b22d feat: Update website\n3b16026 (tag: v1) feat: Launch new homepage\nb72beb5 first commit<\/pre><\/div>\n\n\n\n<p>The fourth commit in our list now has the name of its tag specified. This is because the \u2013decorate flag reveals the references associated with each commit in our commit history.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Returning a Diff<\/h3>\n\n\n\n<p>The \u2013stat flag allows you to display the number of lines of code added to and deleted from a repository in each commit. Here\u2019s an example of the git log \u2013stat command in action:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>Author: James Gallagher &lt;james@users.noreply.github.com&gt;\nDate:   Mon Apr 6 09:11:46 2020 +0100\n    feat: Update website\n index.html | 1 +\n index.js   | 0\n 2 files changed, 1 insertion(+)<\/pre><\/div>\n\n\n\n<p>The plus signs (+) indicate insertions, and, if there were any, the minus signs (-) would indicate deletions. This data allows you to learn more about the overall changes made to a repository.<\/p>\n\n\n\n<p>If you want to see the exact changes made to a repository, you can use the -p flag. This returns a more comprehensive diff showing the changes made in a commit.<\/p>\n\n\n\n<p>Here is one entry returned from the git log -p command, when run on our example repository:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>Author: James Gallagher &lt;37276661+jamesgallagher432@users.noreply.github.com&gt;\nDate:   Tue Apr 7 13:09:58 2020 +0100\n\n    Update index.html\n\ndiff --git a\/index.html b\/index.html\nindex f45673f..2d2701d 100644\n--- a\/index.html\n+++ b\/index.html\n@@ -1,2 +1,3 @@\n-This is a file.\n-Changes have been made.\n+&lt;body&gt;\n+  &lt;p&gt;This is a website.&lt;\/p&gt;\n+&lt;\/body&gt;<\/pre><\/div>\n\n\n\n<p>This output shows us both a description of the commit, and a detailed breakdown of each change made in the commit. We can see when people have added or removed content from files in our repository.<\/p>\n\n\n\n<p>While this data is useful, it can quickly become difficult to read this output if there are many commits to display. You may want to use one or more of the other flags we have discussed in this article. This will help ensure the information returned by this commit is both comprehensive and easy to read.<\/p>\n\n\n\n<p>You can read more about Git diffs in our <a href=\"https:\/\/careerkarma.com\/blog\/git-diff\/\">git diff command guide<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The git shortlog Command<\/h2>\n\n\n\n<p>The git shortlog command provides a summary of a git log. The output of the git shortlog command is grouped by author which means you can easily see who made what changes to a repository.<\/p>\n\n\n\n<p>Let&#8217;s run the git shortlog command on our repository from earlier:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>git shortlog<\/pre><\/div>\n\n\n\n<p>Our command returns:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>James Gallagher (5):\n      first commit\n      feat: Launch new homepage\n      feat: Update website\n      docs: Update README.md\n      Update index.html<\/pre><\/div>\n\n\n\n<p>James is the only person who has contributed to this repository, and he has made five commits. But, if there were other contributors, their contributions would be listed here, alongside the total number of commits they have pushed to the repository.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>The git log command shows you what changes were made to a repository, by whom, and when. You can filter the output of git log to show only the information you need to know.<\/p>\n\n\n\n<p>The git log command comes with two types of flags. Some flags help you format the output of the log. Other flags that can help you filter the commits returned by the command.<\/p>\n\n\n\n<p>This tutorial discussed, with reference to examples, how to use git log and the most common flags used with the command. The git log command is an important tool in your arsenal when working with Git. Once you know how to use this command effectively, you\u2019ll be a master at inspecting Git repositories!<\/p>\n\n\n\n<p>To learn more about Git, read our <a href=\"https:\/\/careerkarma.com\/blog\/what-is-git\/\">How to Learn Git guide<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"The git log command displays a record of the commits in a Git repository. By default, the git log command displays a commit hash, the commit message, and other commit metadata. You can filter the output of git log using various options. Version control systems have one core purpose\u2014to record how your codebase evolves over&hellip;","protected":false},"author":240,"featured_media":17412,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[17286],"tags":[],"class_list":{"0":"post-17411","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-git"},"acf":{"post_sub_title":"","sprint_id":"","query_class":"Git","school_sft":"","parent_sft":"","school_privacy_policy":"","has_review":null,"is_sponser_post":"","is_guest_post":""},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.0 (Yoast SEO v27.0) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Git Log: How to Use It: A Step-By-Step Guide | Career Karma<\/title>\n<meta name=\"description\" content=\"The git log command allows you to view information about the commits in a Git repository. On Career Karma, learn how to use the git log command.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/careerkarma.com\/blog\/git-log\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Git Log: How to Use It\" \/>\n<meta property=\"og:description\" content=\"The git log command allows you to view information about the commits in a Git repository. On Career Karma, learn how to use the git log command.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/careerkarma.com\/blog\/git-log\/\" \/>\n<meta property=\"og:site_name\" content=\"Career Karma\" \/>\n<meta property=\"article:publisher\" content=\"http:\/\/facebook.com\/careerkarmaapp\" \/>\n<meta property=\"article:published_time\" content=\"2020-11-23T09:25:32+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-01T12:04:51+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/05\/six-woman-standing-and-siting-inside-the-room-1181622.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1020\" \/>\n\t<meta property=\"og:image:height\" content=\"681\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"James Gallagher\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@career_karma\" \/>\n<meta name=\"twitter:site\" content=\"@career_karma\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"James Gallagher\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"11 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/careerkarma.com\/blog\/git-log\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/git-log\/\"},\"author\":{\"name\":\"James Gallagher\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\"},\"headline\":\"Git Log: How to Use It\",\"datePublished\":\"2020-11-23T09:25:32+00:00\",\"dateModified\":\"2023-12-01T12:04:51+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/git-log\/\"},\"wordCount\":1831,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/git-log\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/05\/six-woman-standing-and-siting-inside-the-room-1181622.jpg\",\"articleSection\":[\"Git\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/careerkarma.com\/blog\/git-log\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/careerkarma.com\/blog\/git-log\/\",\"url\":\"https:\/\/careerkarma.com\/blog\/git-log\/\",\"name\":\"Git Log: How to Use It: A Step-By-Step Guide | Career Karma\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/git-log\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/git-log\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/05\/six-woman-standing-and-siting-inside-the-room-1181622.jpg\",\"datePublished\":\"2020-11-23T09:25:32+00:00\",\"dateModified\":\"2023-12-01T12:04:51+00:00\",\"author\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\"},\"description\":\"The git log command allows you to view information about the commits in a Git repository. On Career Karma, learn how to use the git log command.\",\"breadcrumb\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/git-log\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/careerkarma.com\/blog\/git-log\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/careerkarma.com\/blog\/git-log\/#primaryimage\",\"url\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/05\/six-woman-standing-and-siting-inside-the-room-1181622.jpg\",\"contentUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/05\/six-woman-standing-and-siting-inside-the-room-1181622.jpg\",\"width\":1020,\"height\":681},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/careerkarma.com\/blog\/git-log\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog\",\"item\":\"https:\/\/careerkarma.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Git\",\"item\":\"https:\/\/careerkarma.com\/blog\/git\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Git Log: How to Use It\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#website\",\"url\":\"https:\/\/careerkarma.com\/blog\/\",\"name\":\"Career Karma\",\"description\":\"Latest Coding Bootcamp News &amp; Career Hacks from Industry Insiders\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/careerkarma.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\",\"name\":\"James Gallagher\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg\",\"contentUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg\",\"caption\":\"James Gallagher\"},\"description\":\"James Gallagher is a self-taught programmer and the technical content manager at Career Karma. He has experience in range of programming languages and extensive expertise in Python, HTML, CSS, and JavaScript. James has written hundreds of programming tutorials, and he frequently contributes to publications like Codecademy, Treehouse, Repl.it, Afrotech, and others.\",\"url\":\"https:\/\/careerkarma.com\/blog\/author\/jamesgallagher\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Git Log: How to Use It: A Step-By-Step Guide | Career Karma","description":"The git log command allows you to view information about the commits in a Git repository. On Career Karma, learn how to use the git log command.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/careerkarma.com\/blog\/git-log\/","og_locale":"en_US","og_type":"article","og_title":"Git Log: How to Use It","og_description":"The git log command allows you to view information about the commits in a Git repository. On Career Karma, learn how to use the git log command.","og_url":"https:\/\/careerkarma.com\/blog\/git-log\/","og_site_name":"Career Karma","article_publisher":"http:\/\/facebook.com\/careerkarmaapp","article_published_time":"2020-11-23T09:25:32+00:00","article_modified_time":"2023-12-01T12:04:51+00:00","og_image":[{"width":1020,"height":681,"url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/05\/six-woman-standing-and-siting-inside-the-room-1181622.jpg","type":"image\/jpeg"}],"author":"James Gallagher","twitter_card":"summary_large_image","twitter_creator":"@career_karma","twitter_site":"@career_karma","twitter_misc":{"Written by":"James Gallagher","Est. reading time":"11 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/careerkarma.com\/blog\/git-log\/#article","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/git-log\/"},"author":{"name":"James Gallagher","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"headline":"Git Log: How to Use It","datePublished":"2020-11-23T09:25:32+00:00","dateModified":"2023-12-01T12:04:51+00:00","mainEntityOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/git-log\/"},"wordCount":1831,"commentCount":0,"image":{"@id":"https:\/\/careerkarma.com\/blog\/git-log\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/05\/six-woman-standing-and-siting-inside-the-room-1181622.jpg","articleSection":["Git"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/careerkarma.com\/blog\/git-log\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/careerkarma.com\/blog\/git-log\/","url":"https:\/\/careerkarma.com\/blog\/git-log\/","name":"Git Log: How to Use It: A Step-By-Step Guide | Career Karma","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/git-log\/#primaryimage"},"image":{"@id":"https:\/\/careerkarma.com\/blog\/git-log\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/05\/six-woman-standing-and-siting-inside-the-room-1181622.jpg","datePublished":"2020-11-23T09:25:32+00:00","dateModified":"2023-12-01T12:04:51+00:00","author":{"@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"description":"The git log command allows you to view information about the commits in a Git repository. On Career Karma, learn how to use the git log command.","breadcrumb":{"@id":"https:\/\/careerkarma.com\/blog\/git-log\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/careerkarma.com\/blog\/git-log\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/git-log\/#primaryimage","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/05\/six-woman-standing-and-siting-inside-the-room-1181622.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/05\/six-woman-standing-and-siting-inside-the-room-1181622.jpg","width":1020,"height":681},{"@type":"BreadcrumbList","@id":"https:\/\/careerkarma.com\/blog\/git-log\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog","item":"https:\/\/careerkarma.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Git","item":"https:\/\/careerkarma.com\/blog\/git\/"},{"@type":"ListItem","position":3,"name":"Git Log: How to Use It"}]},{"@type":"WebSite","@id":"https:\/\/careerkarma.com\/blog\/#website","url":"https:\/\/careerkarma.com\/blog\/","name":"Career Karma","description":"Latest Coding Bootcamp News &amp; Career Hacks from Industry Insiders","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/careerkarma.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94","name":"James Gallagher","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg","caption":"James Gallagher"},"description":"James Gallagher is a self-taught programmer and the technical content manager at Career Karma. He has experience in range of programming languages and extensive expertise in Python, HTML, CSS, and JavaScript. James has written hundreds of programming tutorials, and he frequently contributes to publications like Codecademy, Treehouse, Repl.it, Afrotech, and others.","url":"https:\/\/careerkarma.com\/blog\/author\/jamesgallagher\/"}]}},"_links":{"self":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/17411","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/users\/240"}],"replies":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/comments?post=17411"}],"version-history":[{"count":0,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/17411\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media\/17412"}],"wp:attachment":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media?parent=17411"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/categories?post=17411"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/tags?post=17411"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}