{"id":16281427,"url":"https://github.com/brainexe/git-log-exec","last_synced_at":"2026-04-25T08:35:44.033Z","repository":{"id":46977015,"uuid":"233682091","full_name":"brainexe/git-log-exec","owner":"brainexe","description":"Executes any bash command on the whole git history and produces a CSV file out of it.","archived":false,"fork":false,"pushed_at":"2021-09-19T14:35:27.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-14T14:17:56.449Z","etag":null,"topics":["csv","git","git-history","git-log","git-stats","log","trend"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brainexe.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-01-13T20:02:03.000Z","updated_at":"2021-09-19T14:35:30.000Z","dependencies_parsed_at":"2022-07-26T00:32:06.289Z","dependency_job_id":null,"html_url":"https://github.com/brainexe/git-log-exec","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brainexe%2Fgit-log-exec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brainexe%2Fgit-log-exec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brainexe%2Fgit-log-exec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brainexe%2Fgit-log-exec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brainexe","download_url":"https://codeload.github.com/brainexe/git-log-exec/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247895761,"owners_count":21014381,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csv","git","git-history","git-log","git-stats","log","trend"],"created_at":"2024-10-10T19:07:16.657Z","updated_at":"2026-04-25T08:35:39.013Z","avatar_url":"https://github.com/brainexe.png","language":"Go","readme":"# git-log-exec\nExecutes any bash command on the whole git history and produces a CSV file out of it. This can be visualized quickly into nice graphs/chars.\n\n**Usecases:**\n- LOC/files over time\n- trend of build/compile time\n- trend of technical dept (e.g. search for certain method calls)\n\n## Examples\n### 1) Count files on remote repo\nNote: The docker container will first clone the repository (repo needs to be public+accessable!).\n```\ndocker run --rm brainexe/git-log-exec https://github.com/innogames/slack-bot.git -command=\"find -iname *.go | wc -l\" --limit 10 \nClone https://github.com/innogames/slack-bot.git into local docker container\nCloning into '/repo'...\nCommits: 120, Step size: 11 (11 commits to check)\n 100% |████████████████████████████████████████|  [0s:0s]\nWrote file out.csv\ntime,result,commit\n2019-07-21T19:18:39Z,122,ddeb55b\n2019-09-18T10:58:37Z,136,f77d5f8\n2019-09-27T12:35:50Z,137,0fb8ad5\n2019-10-25T08:21:38Z,143,82ed091\n2019-12-05T20:32:41Z,143,a0ff65d\n2020-01-09T18:42:03Z,148,f84f181\n2020-01-22T07:13:53Z,162,e5c6f2a\n2020-07-30T14:14:31Z,162,431ea0f\n2020-10-02T12:18:27Z,162,41615c2\n2020-10-16T20:16:26Z,162,ba85f3f\n2020-11-07T18:31:12Z,169,16469c3\n```\n\n### 2) Count LOC on local repo over time\nUsing golang/go repo as example:\n```\ndocker run -v $(pwd):/repo  --rm brainexe/git-log-exec -command=\"find . -type f -exec wc -l {} + | awk '{sum += \\$1} END {print sum}'\" --limit 10\ntime,result,commit\n2010-01-07T03:36:28Z,14234142,7a5852b50e\n2011-07-18T02:59:16Z,14736460,a8e0035bd3\n2012-08-20T08:56:41Z,15163804,a8357f0160\n2014-01-09T20:21:24Z,15342160,9847c065f4\n2015-04-07T23:22:12Z,15610076,2f16ddc580\n2016-03-21T04:07:09Z,16031222,39af1eb96f\n2017-03-21T04:04:46Z,16797796,0dafb7d962\n2018-05-03T15:23:13Z,17437888,4704149e04\n2019-09-04T21:52:18Z,18419724,aae0b5b0b2\n2020-11-10T04:11:42Z,18359650,1642cd78b5\n\n```\n\n### 3) Count files of homeassistant repo\n```\ncd ~/projects/home-assistant\ngit-log-exec -out loc.csv -command=\"find homeassistant -type f | wc -l\" \n```\n\n**Result**\n```\ntime,result,commit\n2019-12-22T23:41:22+01:00,12064,48d35a455\n2019-12-04T00:46:38+01:00,12052,564c468c2\n2019-11-27T20:52:03+01:00,12006,d7a66e6e4\n2019-11-25T04:57:40+01:00,11876,c38240673\n2019-11-13T15:32:22+01:00,11876,15ce73835\n2019-11-03T20:36:02+01:00,11779,5fd9b474d\n2019-10-25T01:42:54+02:00,11666,643b3a98e\n2019-10-21T09:55:53+02:00,11607,c1fccee83\n2019-10-17T15:03:05+02:00,11551,8350e1246\n2019-10-12T21:57:18+02:00,11486,17b1ba2e9\n2019-10-07T21:49:54+02:00,11420,1febb32dd\n``` \n\n## Docker usage\n\ndocker run --rm brainexe/git-log-exec\n\n## Options\n```\n  -command string\n    \tcommand to execute\n  -directory string\n    \tgit workspace (by default current directory)\n  -limit int\n    \tmax number of commits to check (default 500)\n  -branch string\n    \tgit branch to check (default \"master\")\n  -output string\n    \toutput csv file (default \"out.csv\")\n  -after string\n    \toptional begin date of history search\n  -before string\n    \toptional end date of history search\n``` \n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrainexe%2Fgit-log-exec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrainexe%2Fgit-log-exec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrainexe%2Fgit-log-exec/lists"}