{"id":19288608,"url":"https://github.com/samber/git-contrib-graph","last_synced_at":"2025-04-22T04:33:54.703Z","repository":{"id":75994378,"uuid":"152062629","full_name":"samber/git-contrib-graph","owner":"samber","description":"📊 Displays a github-like contribution graph, of every contributors of a repository","archived":false,"fork":false,"pushed_at":"2024-04-30T13:18:13.000Z","size":85,"stargazers_count":8,"open_issues_count":9,"forks_count":11,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-02T01:13:58.334Z","etag":null,"topics":["cli","contribution","epitech","git","github","gitlab","graph","repository","tool","university"],"latest_commit_sha":null,"homepage":"","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/samber.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-08T10:37:23.000Z","updated_at":"2024-04-30T13:18:09.000Z","dependencies_parsed_at":"2024-02-03T21:33:28.419Z","dependency_job_id":"6120b030-283b-4850-93a9-ac65a7e231d1","html_url":"https://github.com/samber/git-contrib-graph","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samber%2Fgit-contrib-graph","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samber%2Fgit-contrib-graph/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samber%2Fgit-contrib-graph/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samber%2Fgit-contrib-graph/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samber","download_url":"https://codeload.github.com/samber/git-contrib-graph/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223888363,"owners_count":17220083,"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":["cli","contribution","epitech","git","github","gitlab","graph","repository","tool","university"],"created_at":"2024-11-09T22:09:38.221Z","updated_at":"2024-11-09T22:09:38.830Z","avatar_url":"https://github.com/samber.png","language":"Go","readme":"# Git contrib graph\n\nDisplays a github-like contribution graph, of every contributors of a repository: [example](https://github.com/moby/moby).\n\n## Why\n\nI've been developing this tool for getting a fast overview of student involvement in scholar group projects, at [Epitech](http://epitech.eu) (French university).\n\n## Usage\n\n```sh\n$ go get github.com/samber/git-contrib-graph\n\n$ git-contrib-graph\nUsage of git-contrib-graph:\n  -full-graph\n    \tDisplay days without contributions\n  -git-path string\n    \tFetch logs from local git repository (bare or normal)\n  -git-remote string\n    \tFetch logs from remote git repository Github, Gitlab...\n  -interval string\n    \tDisplay contributions per day, week or month (default \"day\")\n  -json\n    \tDisplay json output contributions object\n  -max-columns int\n    \tNumber of columns in your terminal or output (default 80)\n  -no-colors\n    \tDisabled colors in output\n```\n\n## Example\n\nDisplay contributions per week, with color and including weeks with no commit.\n\n```sh\n$ git-contrib-graph --git-remote https://github.com/samber/invoice-as-a-service \\\n\t--full-graph \\\n\t--interval month\n\nRepo: https://github.com/samber/invoice-as-a-service\n\nContributions to master, excluding merge commits:\n\n\n################################################################################\n################################################################################\n\n\nAuthor: dev@samuel-berthe.fr\n\nTotal:\n   31 commits\n   Insertions: 7557 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n   Deletions:   127 ------------------------------------------------------------\n\nPer day:\n   2018-03-01 | 7063(+) 101(-) +++++++++++++++++++++++++++++++++++++++++++++++++-\n   2018-04-01 |   0(+)   0(-)\n   2018-05-01 |   0(+)   0(-)\n   2018-06-01 |   0(+)   0(-)\n   2018-07-01 | 494(+)  26(-) ++++++++++++++++++++++++++++++++++++++++++++++++---\n   2018-08-01 |   0(+)   0(-)\n   2018-09-01 |   0(+)   0(-)\n   2018-10-01 |   0(+)   0(-)\n\n\n################################################################################\n################################################################################\n\n\nAuthor: catalin@zmole.ro\n\nTotal:\n   4 commits\n   Insertions:  121 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n   Deletions:    25 -------------------------\n\nPer day:\n   2018-03-01 |   0(+)   0(-)\n   2018-04-01 |   0(+)   0(-)\n   2018-05-01 |   0(+)   0(-)\n   2018-06-01 |   0(+)   0(-)\n   2018-07-01 |   0(+)   0(-)\n   2018-08-01 |   0(+)   0(-)\n   2018-09-01 |   0(+)   0(-)\n   2018-10-01 | 121(+)  25(-) +++++++++++++++++++++++++++++++++++++++++---------\n\n\n################################################################################\n################################################################################\n\n\nAuthor: mkingbe@gmail.com\n\nTotal:\n   1 commits\n   Insertions:  386 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n   Deletions:   359 ------------------------------------------------------------\n\nPer day:\n   2018-03-01 |   0(+)   0(-)\n   2018-04-01 |   0(+)   0(-)\n   2018-05-01 |   0(+)   0(-)\n   2018-06-01 |   0(+)   0(-)\n   2018-07-01 |   0(+)   0(-)\n   2018-08-01 |   0(+)   0(-)\n   2018-09-01 |   0(+)   0(-)\n   2018-10-01 | 386(+) 359(-) ++++++++++++++++++++++++++------------------------\n\n```\n\n## Json Example\n\nDisplay contributions per week, with color and including weeks with no commit, as JSON object.\n\n```sh\n$ git-contrib-graph --git-remote https://github.com/samber/invoice-as-a-service --json\n\n{\"interval\": \"day\", \"contributors\": [{\"author\": \"catalin@zmole.ro\", \"total\": {\"commits\": 4, \"insertions\":  121, \"deletions\": 25}, \"graph\": []}, {\"author\": \"mkingbe@gmail.com\", \"total\": {\"commits\": 1, \"insertions\":  386, \"deletions\":  359}, \"graph\": [{\"date\": \"2018-10-03\", \"add\": 121, \"sub\": 25 }]}, {\"author\": \"dev@samuel-berthe.fr\", \"total\": {\"commits\": 31, \"insertions\": 7557, \"deletions\":  127}, \"graph\": [{\"date\": \"2018-10-03\", \"add\": 121, \"sub\": 25 }, {\"date\": \"2018-10-02\", \"add\": 386, \"sub\": 359 }]}]}\n\n```\n\n## Docker\n\nRemote repository:\n\n```\ndocker run --rm samber/git-contrib-graph \\\n       --git-remote https://github.com/samber/invoice-as-a-service \\\n       --interval week --full-graph\n```\n\nLocal repository:\n\n```\ndocker run --rm \\\n       -v /students/john-doe/project-a-b-c:/repo \\\n       samber/git-contrib-graph \\\n       --git-path /repo --interval week  --full-graph\n```\n\n## Todo\n\n- image output\n- custom branch\n- clone on filesystem instead of memory\n- test with lot of public github repo and compare contrib graphs\n- better example in readme\n- get graph for only one contributor\n\n## Contributing\n\n⚠ Quick and dirty project ;)\n\n### Run\n\n```sh\n$ go run git-contrib-graph.go --git-remote https://github.com/samber/invoice-as-a-service \\\n\t--full-graph \\\n\t--max-columns 100 \\\n\t--interval week\n\n...\n```\n\n### About git api and go-git library\n\nGit log command do much more things than you think !\n\n- At low level, initial git commit does not have diff (because it has no parent). Then we fetch number of changes (add/del) based on number of lines.\n- Merge commits have 2 parents. In that case, changes (add/del) are displayed once in `git log` command, but are provided twice in git api (in both original and merge commit)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamber%2Fgit-contrib-graph","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamber%2Fgit-contrib-graph","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamber%2Fgit-contrib-graph/lists"}