{"id":68105,"date":"2022-10-24T09:01:07","date_gmt":"2022-10-24T09:01:07","guid":{"rendered":"https:\/\/www.cryptocabaret.com\/?p=68105"},"modified":"2022-10-24T09:01:07","modified_gmt":"2022-10-24T09:01:07","slug":"how-to-display-commits-created-on-a-specific-day-with-the-git-log-command","status":"publish","type":"post","link":"https:\/\/www.cryptocabaret.com\/?p=68105","title":{"rendered":"How to display commits created on a specific day with the git log command"},"content":{"rendered":"<p><span class=\"field field--name-title field--type-string field--label-hidden\">How to display commits created on a specific day with the git log command<\/span><br \/>\n<span class=\"field field--name-uid field--type-entity-reference field--label-hidden\"><a title=\"View user profile.\" href=\"https:\/\/opensource.com\/users\/agantony\" class=\"username\">Agil Antony<\/a><\/span><br \/>\n<span class=\"field field--name-created field--type-created field--label-hidden\">Mon, 10\/24\/2022 &#8211; 03:00<\/span><\/p>\n<div class=\"clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item\">\n<p>The <code>git log<\/code> command offers many opportunities to learn more about the commits made by contributors. One way you might consume such information is by date. To view commits in a Git repository created on a specific date or range of dates, use the <code>git log<\/code> command with the options <code>--since<\/code> or <code>--until<\/code>, or both.<\/p>\n<\/p>\n<div class=\"embedded-resource-list callout-float-right\">\n<div class=\"field field--name-title field--type-string field--label-hidden field__item\">More on Git<\/div>\n<div class=\"field field--name-links field--type-link field--label-hidden field__items\">\n<div class=\"field__item\"><a href=\"https:\/\/opensource.com\/resources\/what-is-git?intcmp=7013a000002CxqLAAS\">What is Git?<\/a><\/div>\n<div class=\"field__item\"><a href=\"https:\/\/opensource.com\/downloads\/cheat-sheet-git?intcmp=7013a000002CxqLAAS\">Git cheat sheet<\/a><\/div>\n<div class=\"field__item\"><a href=\"https:\/\/opensource.com\/downloads\/cheat-sheet-markdown?intcmp=7013a000002CxqLAAS\">Markdown cheat sheet<\/a><\/div>\n<div class=\"field__item\"><a href=\"https:\/\/opensource.com\/tags\/git?intcmp=7013a000002CxqLAAS\">New Git articles<\/a><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<p>First, checkout the branch you want to inspect (for example, <code>main<\/code>):<\/p>\n<pre>\n<span class=\"geshifilter\"><code class=\"bash geshifilter-bash\"><span class=\"co4\">$ <\/span><span class=\"kw2\">git checkout<\/span> main<\/code><\/span><\/pre>\n<p>Next, display the commits for the current date (today):<\/p>\n<pre>\n<span class=\"geshifilter\"><code class=\"bash geshifilter-bash\"><span class=\"co4\">$ <\/span><span class=\"kw2\">git log<\/span> <span class=\"re5\">--oneline<\/span> <span class=\"re5\">--since<\/span>=<span class=\"st0\">\"yesterday\"<\/span><\/code><\/span><\/pre>\n<p>Display commits for the current date by a specific author only (for example, <code>Agil<\/code>):<\/p>\n<pre>\n<span class=\"geshifilter\"><code class=\"bash geshifilter-bash\"><span class=\"co4\">$ <\/span><span class=\"kw2\">git log<\/span> <span class=\"re5\">--oneline<\/span> <span class=\"re5\">--since<\/span>=<span class=\"st0\">\"yesterday\"<\/span> <span class=\"re5\">--author<\/span>=<span class=\"st0\">\"Agil\"<\/span><\/code><\/span><\/pre>\n<p>You can also display results for a range of dates. Display commits between any two dates (for example, 22 April 2022 and 24 April 2022):<\/p>\n<pre>\n<span class=\"geshifilter\"><code class=\"bash geshifilter-bash\"><span class=\"co4\">$ <\/span><span class=\"kw2\">git log<\/span> <span class=\"re5\">--oneline<\/span> <span class=\"re5\">--since<\/span>=<span class=\"st0\">\"2022-04-22\"<\/span> <span class=\"re5\">--until<\/span>=<span class=\"st0\">\"2022-04-24\"<\/span><\/code><\/span><\/pre>\n<p>In this example, the output displays all the commits between 22 April 2022 and 24 April 2022, which excludes the commits done on 22 April 2022. If you want to include the commits done on 22 April 2022, replace <code>2022-04-22<\/code> with <code>2022-04-21<\/code>.<\/p>\n<p>Run the following command to display commits between any two dates by a specific author only (for example, <code>Agil<\/code>):<\/p>\n<pre>\n<div class=\"geshifilter\"><div class=\"bash geshifilter-bash\">$ <span class=\"kw2\">git log<\/span> <span class=\"re5\">--oneline<\/span> <span class=\"re5\">--since<\/span>=<span class=\"st0\">\"2022-04-22\"<\/span> <br><span class=\"re5\">--until<\/span>=<span class=\"st0\">\"2022-04-24\"<\/span> <span class=\"re5\">--author<\/span>=<span class=\"st0\">\"Agil\"<\/span><\/div><\/div><\/pre>\n<h2>Reporting<\/h2>\n<p>Git has many advantages, and one of them is the way it enables you to gather data about your project. The <code>git log<\/code> command is an important reporting tool and yet another reason to use Git!<\/p>\n<\/div>\n<div class=\"clearfix text-formatted field field--name-field-article-subhead field--type-text-long field--label-hidden field__item\">\n<p>The git log command is an important reporting tool and yet another reason to use Git.<\/p>\n<\/div>\n<div class=\"field field--name-field-lead-image field--type-entity-reference field--label-hidden field__item\">\n<article class=\"media media--type-image media--view-mode-caption\">\n<div class=\"field field--name-field-media-image field--type-image field--label-hidden field__item\">  <img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/www.cryptocabaret.com\/wp-content\/uploads\/2022\/10\/calendar.jpg\" width=\"520\" height=\"292\" alt=\"Poll: Upcoming open source conferences\" title=\"Calendar\"><\/div>\n<div class=\"field field--name-field-caption field--type-text-long field--label-hidden caption field__item\"><span class=\"caption__byline\">Image by: <\/span><\/p>\n<p>by Dafne Cholet. CC BY-SA 2.0.<\/p>\n<p>\u00a0<\/p>\n<\/div>\n<\/article>\n<\/div>\n<div class=\"field field--name-field-tags field--type-entity-reference field--label-hidden field__items\">\n<div class=\"field__item\"><a href=\"https:\/\/opensource.com\/tags\/git\" hreflang=\"en\">Git<\/a><\/div>\n<\/p><\/div>\n<div class=\"hidden field field--name-field-listicle-title field--type-string field--label-hidden field__item\">What to read next<\/div>\n<div class=\"field field--name-field-default-license field--type-list-string field--label-hidden field__item\"><a rel=\"license\" href=\"http:\/\/creativecommons.org\/licenses\/by-sa\/4.0\/\"><br \/>\n        <img decoding=\"async\" alt=\"Creative Commons License\" src=\"https:\/\/www.cryptocabaret.com\/wp-content\/uploads\/2022\/10\/cc-by-sa--25.png\" title=\"This work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License.\"><\/a>This work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License.<\/div>\n<section class=\"field field--name-field-comments field--type-comment field--label-hidden comment-wrapper\">\n<div class=\"comments__count\">\n<div class=\"login\"><a href=\"https:\/\/opensource.com\/user\/register?absolute=1\">Register<\/a> or <a href=\"https:\/\/opensource.com\/user\/login?current=\/rss.xml&amp;absolute=1\">Login<\/a> to post a comment.<\/div>\n<\/p><\/div>\n<\/section>\n<p class=\"wpematico_credit\"><small>Powered by <a href=\"http:\/\/www.wpematico.com\" target=\"_blank\" rel=\"noopener\">WPeMatico<\/a><\/small><\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to display commits created on a specific day with the git log command Agil Antony Mon, 10\/24\/2022 &#8211; 03:00 The git log command offers many opportunities to learn more about the commits made by contributors. One way you might consume such information is by date. To view commits in a Git repository created on [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":68106,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[307],"tags":[],"class_list":["post-68105","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-open-source"],"_links":{"self":[{"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=\/wp\/v2\/posts\/68105","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=68105"}],"version-history":[{"count":0,"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=\/wp\/v2\/posts\/68105\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=\/wp\/v2\/media\/68106"}],"wp:attachment":[{"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=68105"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=68105"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=68105"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}