{"id":15167012,"url":"https://github.com/tserious/commitas","last_synced_at":"2026-01-19T23:35:25.068Z","repository":{"id":225420157,"uuid":"765694665","full_name":"TSerious/CommitAs","owner":"TSerious","description":"Quickly change the user of a git repository (and the author of a commit) during a commit.","archived":false,"fork":false,"pushed_at":"2024-03-05T14:46:17.000Z","size":198,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-14T21:47:37.079Z","etag":null,"topics":["avalonia","avaloniaui","commit","fluentavalonia","git"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TSerious.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}},"created_at":"2024-03-01T12:39:39.000Z","updated_at":"2024-12-12T06:50:48.000Z","dependencies_parsed_at":"2024-03-05T15:28:12.846Z","dependency_job_id":null,"html_url":"https://github.com/TSerious/CommitAs","commit_stats":null,"previous_names":["tserious/commitas"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TSerious%2FCommitAs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TSerious%2FCommitAs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TSerious%2FCommitAs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TSerious%2FCommitAs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TSerious","download_url":"https://codeload.github.com/TSerious/CommitAs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247970397,"owners_count":21026141,"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":["avalonia","avaloniaui","commit","fluentavalonia","git"],"created_at":"2024-09-27T05:21:49.994Z","updated_at":"2026-01-19T23:35:25.011Z","avatar_url":"https://github.com/TSerious.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"﻿# CommitAs\n\nThis tool allows you to quickly change the user of a git repository **during** a commit.\n\n\u003cimg src=\"Screenshot.png\"/\u003e\n\n**REMARKS:** This app currently only works on Windows platform. But as it uses [Avalonia UI](https://avaloniaui.net/) for the UI it can be extended to work for other platforms as well.\n\n## Purpose\n\nIn our development team we share the usage of PCs connected directly to a hardware development platform. But we want to be able to trak who has done what in out git repository without the need to change the configuration of the git client (for example Visual Studio or [Git Extensions](https://gitextensions.github.io/)). But this tool also works when doing commit directly in the console.\n\n## Functional Principle\n\n*CommitAs* uses two [Git Hooks](https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks): pre-commit and post-commit.\nWhen ```git commit``` is executed the *pre-commit* hook starts *CommitAs.exe* to change the curren user (name and email) of the repository.\nIf the user has been changed successfully a dummy file ```_CommitAsTempFile_``` is created.\nThis file is deleted by the *post-commit* hook. Which then also executes *PostCommitAs.exe* to change the author of the last commit using ```git commit --amend```.\n\n## Usage\n\n__Configure your repository to use *ssl* for push and pull operations.__\n\nYour repository contains a hidden folder ```.git```.\nTo use the tool download and extract the latest release into the root folder of any repository into the folder ```CommitAs``` and add this folder to your ```.gitignore```.\nThe resulting folder structure should be:\n```\n.\n├── .git\n├── CommitAs\n│   ├── ...\n│   ├── CommitAs.exe\n│   ├── PostCommitAs.exe\n│   └── ...\n...\n```\nCopy the files ```pre-commit``` and ```post-commit``` from the folder ```CommitAs\\hooks``` into the folder ```.git\\hooks```.\n\nThats all. On your next commit you will be prompted to enter the name of the user for which you want to do the commit.\n\n## Configuration\n\nThe configuration is saved in ```CommitAsConfig.json```.\n\nThis file contains a list of \"Users\", an \"Email\", the \"CurrentUser\", and some command configuartions.\nEach user in \"Users\" has a *Name* and an optional *Email*. The \"CurrentUser\" is the last user that was selected in *CommitAs.exe*.\nIf *Email* of the \"CurrentUser\" is empty the (global) \"Email\" will be used.\n\n- \"CommandPath\" is executed before every other command.\n- \"CommandConfigUserName\" is the command that is executed to set the user.name.\n- \"CommandConfigUserEmail\" is the command that is executed to set the user.email.\n- \"CommandAmend\" is the command that is executed by *PastCommitAs.exe*.\n\n__Remark:__ ``{name}`` and ``{email}`` are placeholders for the name and the email of a user.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftserious%2Fcommitas","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftserious%2Fcommitas","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftserious%2Fcommitas/lists"}