{"id":16569040,"url":"https://github.com/thehale/git-authorship","last_synced_at":"2025-07-30T20:03:02.923Z","repository":{"id":130440550,"uuid":"530797893","full_name":"thehale/git-authorship","owner":"thehale","description":"Interactive reports to explore who wrote each line of code in a git repository.","archived":false,"fork":false,"pushed_at":"2025-05-26T10:04:37.000Z","size":26327,"stargazers_count":28,"open_issues_count":3,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-23T00:26:56.539Z","etag":null,"topics":["copyright","education","git","git-blame","grading","hacktoberfest","oss-compliance","reporting","spdx"],"latest_commit_sha":null,"homepage":"https://jhale.dev/posts/git-authorship/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thehale.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2022-08-30T19:18:57.000Z","updated_at":"2025-07-10T11:14:25.000Z","dependencies_parsed_at":"2023-03-15T20:30:58.778Z","dependency_job_id":"c0cb5e85-b208-4a1b-b723-3b8b67b2129c","html_url":"https://github.com/thehale/git-authorship","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/thehale/git-authorship","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thehale%2Fgit-authorship","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thehale%2Fgit-authorship/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thehale%2Fgit-authorship/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thehale%2Fgit-authorship/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thehale","download_url":"https://codeload.github.com/thehale/git-authorship/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thehale%2Fgit-authorship/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267930497,"owners_count":24167471,"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","status":"online","status_checked_at":"2025-07-30T02:00:09.044Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["copyright","education","git","git-blame","grading","hacktoberfest","oss-compliance","reporting","spdx"],"created_at":"2024-10-11T21:12:15.447Z","updated_at":"2025-07-30T20:03:02.896Z","avatar_url":"https://github.com/thehale.png","language":"Python","funding_links":["https://github.com/sponsors/thehale"],"categories":[],"sub_categories":[],"readme":"\u003c!--\n Copyright (c) 2022 Joseph Hale\n \n This Source Code Form is subject to the terms of the Mozilla Public\n License, v. 2.0. If a copy of the MPL was not distributed with this\n file, You can obtain one at http://mozilla.org/MPL/2.0/.\n--\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n# Git-Authorship\n\nInteractive reports showing who wrote each line of code in your git repository.\n\n\u003c!-- BADGES --\u003e\n[![](https://badgen.net/github/license/thehale/git-authorship)](https://github.com/thehale/git-authorship/blob/master/LICENSE)\n[![](https://badgen.net/badge/icon/Sponsor/pink?icon=github\u0026label)](https://github.com/sponsors/thehale)\n[![Joseph Hale's software engineering blog](https://jhale.dev/badges/website.svg)](https://jhale.dev)\n[![](https://jhale.dev/badges/follow.svg)](https://www.linkedin.com/comm/mynetwork/discovery-see-all?usecase=PEOPLE_FOLLOWS\u0026followMember=thehale)\n\u003c/div\u003e\n\n```bash\npip install git-authorship\n\ngit-authorship https://github.com/USERNAME/REPOSITORY\n\n# Open build/authorship.html in a web browser\n```\n\u003cdiv align=\"center\"\u003e\n\n![GIF demonstrating an interactive report of the authors of the cubing library\ncubing.js](https://github.com/thehale/git-authorship/blob/master/docs/git-authorship-demo-cubingjs.gif?raw=true)\n\n\u003c/div\u003e\n\n## Why?\n\nCopyright is a thing, and whoever wrote the code in your repository holds an\nexclusive copyright over it unless an agreement has been made otherwise. \n\nWhile `git-authorship` does not help with managing copyright agreements from\ncontributors (see\n[cla-assistant](https://github.com/cla-assistant/cla-assistant) and its\ncorresponding [GitHub\nAction](https://github.com/contributor-assistant/github-action) for that\nfunctionality), it does help you clearly identify who your contributors are and\nthe exact lines of code they wrote.\n\n\nTo support libraries undergoing re-licensing, `git-authorship` includes config\nfiles for labelling the licenses under which contributors have shared their code.\n\n## Other Features\n\n### Mailmaps\n\nWhen an author changes his/her commit name or email, that author will appear\nmultiple times in the authorship report.\n\nTo reduce that noise, add [a standard `.mailmap`\nfile](https://git-scm.com/docs/git-blame/2.15.4#_mapping_authors) to the root of\nyour git repository.\n\n_.mailmap_\n```\nProper Name \u003ccommit@email.xx\u003e\n\u003cproper@email.xx\u003e \u003ccommit@email.xx\u003e\nProper Name \u003cproper@email.xx\u003e \u003ccommit@email.xx\u003e\nProper Name \u003cproper@email.xx\u003e Commit Name \u003ccommit@email.xx\u003e\n```\n\n### Ignore Revs\n\nAutomated tools (e.g. linters/formatters) which change many lines can lead to\nauthorship being attributed to the individual who ran the tool instead of the\noriginal author.\n\nHowever, if you identify the formatting commits and list their full commit SHAs\nin a file, Git Authorship can correctly attribute the original author. The\ndefault file is `.git-blame-ignore-revs`, placed at the root of the repository.\n\n_.git-blame-ignore-revs_\n```\n# Run automated formatter\n9c6927b59791eb71cce0a84d8c88fa14d5235fa8\n\n# Run automated linter\nba09bf70676fb13891d15236951450b2f1aa9f3b\n```\n\nYou can specify an alternate location via the `--ignore-revs-file` option\n(resolved relative to the repository root).\n\n```bash\ngit-authorship REPO_URL --ignore-revs-file .nonstandard-ignore-revs-file\n```\n\n### Author Licenses\n\nYou can include OSS licensing information for each author via a `.csv` file. \nThe `author-name` will be matched to the values shown in the generated\nauthorship report.\n\n_licensing.csv_ \n```\nauthor-name,license-SPDX-id\n```\n\n\u003csub\u003eA list of SPDX license identifiers can be found at [spdx.org/licenses](https://spdx.org/licenses)\u003c/sub\u003e\n\nThen tell the CLI about the authorship file (resolved relative to your current\nworking directory)\n\n```bash\ngit-authorship REPO_URL --author-licenses licensing.csv\n```\n\n### Pseudonyms\nIf certain files are being attributed to an unexpected author (e.g. if a\ncontributor copied code from another project, the `blame` would show the\ncontributor instead of the original author), you can manually override the\n`blame` and licensing information.\n\n_pseudonyms.csv_\n```\ntarget-path,actual-author,license-SPDX-id\n```\n\u003csub\u003eA list of SPDX license identifiers can be found at [spdx.org/licenses](https://spdx.org/licenses)\u003c/sub\u003e\n\n\u003e [!NOTE]\n\u003e `target-path` can refer to either a specific file or an entire folder which will be attributed to `actual-author` under the named software license.\n\n\nThen tell the CLI about the pseudonyms file (resolved relative to your current\nworking directory)\n\n```bash\ngit-authorship REPO_URL --pseudonyms pseudonyms.csv\n```\n\n## License\nCopyright (c) 2022-2024 Joseph Hale, All Rights Reserved\n\nProvided under the terms of the [Mozilla Public License, version 2.0](./LICENSE)\n\n\u003cdetails\u003e\n\n\u003csummary\u003e\u003cb\u003eWhat does the MPL-2.0 license allow/require?\u003c/b\u003e\u003c/summary\u003e\n\n### TL;DR\n\nYou can use files from this project in both open source and proprietary\napplications, provided you include the above attribution. However, if\nyou modify any code in this project, or copy blocks of it into your own\ncode, you must publicly share the resulting files (note, not your whole\nprogram) under the MPL-2.0. The best way to do this is via a Pull\nRequest back into this project.\n\nIf you have any other questions, you may also find Mozilla's [official\nFAQ](https://www.mozilla.org/en-US/MPL/2.0/FAQ/) for the MPL-2.0 license\ninsightful.\n\nIf you dislike this license, you can contact me about negotiating a paid\ncontract with different terms.\n\n**Disclaimer:** This TL;DR is just a summary. All legal questions\nregarding usage of this project must be handled according to the\nofficial terms specified in the `LICENSE` file.\n\n### Why the MPL-2.0 license?\n\nI believe that an open-source software license should ensure that code\ncan be used everywhere.\n\nStrict copyleft licenses, like the GPL family of licenses, fail to\nfulfill that vision because they only permit code to be used in other\nGPL-licensed projects. Permissive licenses, like the MIT and Apache\nlicenses, allow code to be used everywhere but fail to prevent\nproprietary or GPL-licensed projects from limiting access to any\nimprovements they make.\n\nIn contrast, the MPL-2.0 license allows code to be used in any software\nproject, while ensuring that any improvements remain available for\neveryone.\n\n\u003c/details\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthehale%2Fgit-authorship","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthehale%2Fgit-authorship","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthehale%2Fgit-authorship/lists"}