{"id":1928,"date":"2013-08-04T18:06:51","date_gmt":"2013-08-04T17:06:51","guid":{"rendered":"http:\/\/thekua.com\/atwork\/?p=1928"},"modified":"2013-08-04T18:06:51","modified_gmt":"2013-08-04T17:06:51","slug":"number-of-commits-in-git","status":"publish","type":"post","link":"https:\/\/thekua.com\/atwork\/2013\/08\/number-of-commits-in-git\/","title":{"rendered":"Number of commits in git"},"content":{"rendered":"<p>I have been working on a project that required me to work out the number of commits in a git repository. I thought github would show that in their display, but could find no such statistic once you get over a certain number. The only number I could find that indicated it was over 1000. <\/p>\n<p><a href=\"http:\/\/thekua.com\/atwork\/wp-content\/uploads\/2013\/07\/Screen-Shot-2013-07-11-at-22.31.15.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/thekua.com\/atwork\/wp-content\/uploads\/2013\/07\/Screen-Shot-2013-07-11-at-22.31.15.png\" alt=\"Git commit count on github\" width=\"808\" height=\"66\" class=\"aligncenter size-full wp-image-1929\" srcset=\"https:\/\/thekua.com\/atwork\/wp-content\/uploads\/2013\/07\/Screen-Shot-2013-07-11-at-22.31.15.png 808w, https:\/\/thekua.com\/atwork\/wp-content\/uploads\/2013\/07\/Screen-Shot-2013-07-11-at-22.31.15-300x24.png 300w, https:\/\/thekua.com\/atwork\/wp-content\/uploads\/2013\/07\/Screen-Shot-2013-07-11-at-22.31.15-800x66.png 800w\" sizes=\"auto, (max-width: 808px) 100vw, 808px\" \/><\/a><\/p>\n<p>Searching around, there are a few solutions including most recently:<\/p>\n<p><code>git rev-list HEAD --count<\/code><\/p>\n<p>or<\/p>\n<p><code>git shortlog | grep -E '^[ ]+\\w+' | wc -l<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have been working on a project that required me to work out the number of commits in a git repository. I thought github would show that in their display, but could find no such statistic once you get over a certain number. The only number I could find that indicated it was over 1000. [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[32,4,58],"tags":[],"class_list":["post-1928","post","type-post","status-publish","format-standard","hentry","category-analysis","category-development","category-git","post-preview"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Number of commits in git - patkua@work<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/thekua.com\/atwork\/2013\/08\/number-of-commits-in-git\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Number of commits in git - patkua@work\" \/>\n<meta property=\"og:description\" content=\"I have been working on a project that required me to work out the number of commits in a git repository. I thought github would show that in their display, but could find no such statistic once you get over a certain number. The only number I could find that indicated it was over 1000. [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/thekua.com\/atwork\/2013\/08\/number-of-commits-in-git\/\" \/>\n<meta property=\"og:site_name\" content=\"patkua@work\" \/>\n<meta property=\"article:published_time\" content=\"2013-08-04T17:06:51+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/thekua.com\/atwork\/wp-content\/uploads\/2013\/07\/Screen-Shot-2013-07-11-at-22.31.15.png\" \/>\n<meta name=\"author\" content=\"Patrick\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@patkua\" \/>\n<meta name=\"twitter:site\" content=\"@patkua\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Patrick\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/thekua.com\\\/atwork\\\/2013\\\/08\\\/number-of-commits-in-git\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/thekua.com\\\/atwork\\\/2013\\\/08\\\/number-of-commits-in-git\\\/\"},\"author\":{\"name\":\"Patrick\",\"@id\":\"https:\\\/\\\/thekua.com\\\/atwork\\\/#\\\/schema\\\/person\\\/c942203c9ed3ff9e21c6c49a996ea3ae\"},\"headline\":\"Number of commits in git\",\"datePublished\":\"2013-08-04T17:06:51+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/thekua.com\\\/atwork\\\/2013\\\/08\\\/number-of-commits-in-git\\\/\"},\"wordCount\":70,\"commentCount\":1,\"image\":{\"@id\":\"https:\\\/\\\/thekua.com\\\/atwork\\\/2013\\\/08\\\/number-of-commits-in-git\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/thekua.com\\\/atwork\\\/wp-content\\\/uploads\\\/2013\\\/07\\\/Screen-Shot-2013-07-11-at-22.31.15.png\",\"articleSection\":[\"Analysis\",\"Development\",\"Git\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/thekua.com\\\/atwork\\\/2013\\\/08\\\/number-of-commits-in-git\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/thekua.com\\\/atwork\\\/2013\\\/08\\\/number-of-commits-in-git\\\/\",\"url\":\"https:\\\/\\\/thekua.com\\\/atwork\\\/2013\\\/08\\\/number-of-commits-in-git\\\/\",\"name\":\"Number of commits in git - patkua@work\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/thekua.com\\\/atwork\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/thekua.com\\\/atwork\\\/2013\\\/08\\\/number-of-commits-in-git\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/thekua.com\\\/atwork\\\/2013\\\/08\\\/number-of-commits-in-git\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/thekua.com\\\/atwork\\\/wp-content\\\/uploads\\\/2013\\\/07\\\/Screen-Shot-2013-07-11-at-22.31.15.png\",\"datePublished\":\"2013-08-04T17:06:51+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/thekua.com\\\/atwork\\\/#\\\/schema\\\/person\\\/c942203c9ed3ff9e21c6c49a996ea3ae\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/thekua.com\\\/atwork\\\/2013\\\/08\\\/number-of-commits-in-git\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/thekua.com\\\/atwork\\\/2013\\\/08\\\/number-of-commits-in-git\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/thekua.com\\\/atwork\\\/2013\\\/08\\\/number-of-commits-in-git\\\/#primaryimage\",\"url\":\"http:\\\/\\\/thekua.com\\\/atwork\\\/wp-content\\\/uploads\\\/2013\\\/07\\\/Screen-Shot-2013-07-11-at-22.31.15.png\",\"contentUrl\":\"http:\\\/\\\/thekua.com\\\/atwork\\\/wp-content\\\/uploads\\\/2013\\\/07\\\/Screen-Shot-2013-07-11-at-22.31.15.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/thekua.com\\\/atwork\\\/2013\\\/08\\\/number-of-commits-in-git\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/thekua.com\\\/atwork\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Number of commits in git\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/thekua.com\\\/atwork\\\/#website\",\"url\":\"https:\\\/\\\/thekua.com\\\/atwork\\\/\",\"name\":\"patkua@work\",\"description\":\"The intersection of technology and leadership\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/thekua.com\\\/atwork\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/thekua.com\\\/atwork\\\/#\\\/schema\\\/person\\\/c942203c9ed3ff9e21c6c49a996ea3ae\",\"name\":\"Patrick\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/2ef85a5f91c2aac13efb3ac90077b4db7f8883cafd6e60f2bcecba6b092d4011?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/2ef85a5f91c2aac13efb3ac90077b4db7f8883cafd6e60f2bcecba6b092d4011?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/2ef85a5f91c2aac13efb3ac90077b4db7f8883cafd6e60f2bcecba6b092d4011?s=96&d=mm&r=g\",\"caption\":\"Patrick\"},\"sameAs\":[\"http:\\\/\\\/thekua.com\\\/atwork\"],\"url\":\"https:\\\/\\\/thekua.com\\\/atwork\\\/author\\\/patrick\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Number of commits in git - patkua@work","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:\/\/thekua.com\/atwork\/2013\/08\/number-of-commits-in-git\/","og_locale":"en_US","og_type":"article","og_title":"Number of commits in git - patkua@work","og_description":"I have been working on a project that required me to work out the number of commits in a git repository. I thought github would show that in their display, but could find no such statistic once you get over a certain number. The only number I could find that indicated it was over 1000. [&hellip;]","og_url":"https:\/\/thekua.com\/atwork\/2013\/08\/number-of-commits-in-git\/","og_site_name":"patkua@work","article_published_time":"2013-08-04T17:06:51+00:00","og_image":[{"url":"http:\/\/thekua.com\/atwork\/wp-content\/uploads\/2013\/07\/Screen-Shot-2013-07-11-at-22.31.15.png","type":"","width":"","height":""}],"author":"Patrick","twitter_card":"summary_large_image","twitter_creator":"@patkua","twitter_site":"@patkua","twitter_misc":{"Written by":"Patrick"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/thekua.com\/atwork\/2013\/08\/number-of-commits-in-git\/#article","isPartOf":{"@id":"https:\/\/thekua.com\/atwork\/2013\/08\/number-of-commits-in-git\/"},"author":{"name":"Patrick","@id":"https:\/\/thekua.com\/atwork\/#\/schema\/person\/c942203c9ed3ff9e21c6c49a996ea3ae"},"headline":"Number of commits in git","datePublished":"2013-08-04T17:06:51+00:00","mainEntityOfPage":{"@id":"https:\/\/thekua.com\/atwork\/2013\/08\/number-of-commits-in-git\/"},"wordCount":70,"commentCount":1,"image":{"@id":"https:\/\/thekua.com\/atwork\/2013\/08\/number-of-commits-in-git\/#primaryimage"},"thumbnailUrl":"http:\/\/thekua.com\/atwork\/wp-content\/uploads\/2013\/07\/Screen-Shot-2013-07-11-at-22.31.15.png","articleSection":["Analysis","Development","Git"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/thekua.com\/atwork\/2013\/08\/number-of-commits-in-git\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/thekua.com\/atwork\/2013\/08\/number-of-commits-in-git\/","url":"https:\/\/thekua.com\/atwork\/2013\/08\/number-of-commits-in-git\/","name":"Number of commits in git - patkua@work","isPartOf":{"@id":"https:\/\/thekua.com\/atwork\/#website"},"primaryImageOfPage":{"@id":"https:\/\/thekua.com\/atwork\/2013\/08\/number-of-commits-in-git\/#primaryimage"},"image":{"@id":"https:\/\/thekua.com\/atwork\/2013\/08\/number-of-commits-in-git\/#primaryimage"},"thumbnailUrl":"http:\/\/thekua.com\/atwork\/wp-content\/uploads\/2013\/07\/Screen-Shot-2013-07-11-at-22.31.15.png","datePublished":"2013-08-04T17:06:51+00:00","author":{"@id":"https:\/\/thekua.com\/atwork\/#\/schema\/person\/c942203c9ed3ff9e21c6c49a996ea3ae"},"breadcrumb":{"@id":"https:\/\/thekua.com\/atwork\/2013\/08\/number-of-commits-in-git\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/thekua.com\/atwork\/2013\/08\/number-of-commits-in-git\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/thekua.com\/atwork\/2013\/08\/number-of-commits-in-git\/#primaryimage","url":"http:\/\/thekua.com\/atwork\/wp-content\/uploads\/2013\/07\/Screen-Shot-2013-07-11-at-22.31.15.png","contentUrl":"http:\/\/thekua.com\/atwork\/wp-content\/uploads\/2013\/07\/Screen-Shot-2013-07-11-at-22.31.15.png"},{"@type":"BreadcrumbList","@id":"https:\/\/thekua.com\/atwork\/2013\/08\/number-of-commits-in-git\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/thekua.com\/atwork\/"},{"@type":"ListItem","position":2,"name":"Number of commits in git"}]},{"@type":"WebSite","@id":"https:\/\/thekua.com\/atwork\/#website","url":"https:\/\/thekua.com\/atwork\/","name":"patkua@work","description":"The intersection of technology and leadership","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/thekua.com\/atwork\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/thekua.com\/atwork\/#\/schema\/person\/c942203c9ed3ff9e21c6c49a996ea3ae","name":"Patrick","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/2ef85a5f91c2aac13efb3ac90077b4db7f8883cafd6e60f2bcecba6b092d4011?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/2ef85a5f91c2aac13efb3ac90077b4db7f8883cafd6e60f2bcecba6b092d4011?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/2ef85a5f91c2aac13efb3ac90077b4db7f8883cafd6e60f2bcecba6b092d4011?s=96&d=mm&r=g","caption":"Patrick"},"sameAs":["http:\/\/thekua.com\/atwork"],"url":"https:\/\/thekua.com\/atwork\/author\/patrick\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/thekua.com\/atwork\/wp-json\/wp\/v2\/posts\/1928","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thekua.com\/atwork\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thekua.com\/atwork\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thekua.com\/atwork\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/thekua.com\/atwork\/wp-json\/wp\/v2\/comments?post=1928"}],"version-history":[{"count":2,"href":"https:\/\/thekua.com\/atwork\/wp-json\/wp\/v2\/posts\/1928\/revisions"}],"predecessor-version":[{"id":1949,"href":"https:\/\/thekua.com\/atwork\/wp-json\/wp\/v2\/posts\/1928\/revisions\/1949"}],"wp:attachment":[{"href":"https:\/\/thekua.com\/atwork\/wp-json\/wp\/v2\/media?parent=1928"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thekua.com\/atwork\/wp-json\/wp\/v2\/categories?post=1928"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thekua.com\/atwork\/wp-json\/wp\/v2\/tags?post=1928"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}