{"id":13558378,"url":"https://github.com/dmfutcher/git-profile","last_synced_at":"2026-01-05T16:16:34.053Z","repository":{"id":56026195,"uuid":"217883146","full_name":"dmfutcher/git-profile","owner":"dmfutcher","description":"Simple identity switching for git","archived":false,"fork":false,"pushed_at":"2022-03-01T15:44:01.000Z","size":35,"stargazers_count":49,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-01T22:08:03.033Z","etag":null,"topics":["git","git-profile"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/dmfutcher.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-10-27T16:26:43.000Z","updated_at":"2024-01-04T16:39:06.000Z","dependencies_parsed_at":"2022-08-15T11:40:37.695Z","dependency_job_id":null,"html_url":"https://github.com/dmfutcher/git-profile","commit_stats":null,"previous_names":["bobbo/git-profile"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmfutcher%2Fgit-profile","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmfutcher%2Fgit-profile/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmfutcher%2Fgit-profile/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmfutcher%2Fgit-profile/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dmfutcher","download_url":"https://codeload.github.com/dmfutcher/git-profile/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247009547,"owners_count":20868567,"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":["git","git-profile"],"created_at":"2024-08-01T12:04:55.238Z","updated_at":"2026-01-05T16:16:34.012Z","avatar_url":"https://github.com/dmfutcher.png","language":"Rust","funding_links":[],"categories":["Rust","git"],"sub_categories":[],"readme":"# git-profile\n\n*git-profile* is a simple user profile manager for *git*. It lets you set-up multiple user profiles for git \u0026 switch\nbetween them, generate remote URLs and more. If you ever have to manage multiple identities with git, *git-profile* can make\nyour life easier.\n\n## Install\n\nIf you have Cargo installed, run `cargo install git-profile`. You can also grab a pre-built (Mac) binaries from the releases page.\nIt should be installed on your path as `git-profile`. The `git-` prefix allows it to be called like any other git command.\n\n## Usage\n\n### Create a profile\n\nAt a minimum you need a profile name (best to keep this quite short), your author name and author email.\n\n`git profile new github 'Full Name' 'open-source@personal.com'`\n\nCreate a profile with a custom URL scheme:\n\n`git profile new github-work 'Full Name' 'name@work.com' --username CompanyName --remote 'git@github.com-work:{{username}}/{{project}}.git'`\n\n### Switch profiles\n\nThe `use` command switches you between profiles. This sets the profile for the repository in your current working directory.\n\n`git profile use github-work`\n\n`git profile use open-source`\n\n### List profiles\n\nList all the profiles. An asterisk will appear next to the currently enabled profile.\n\n`git profile ls`\n\n### Use with ssh config\n\nIf your different profiles each have different ssh key-pairs set-up,\nyou can configure git-profile to use them via shared ssh-hosts and usernames:\n\n`~/.ssh/config`:\n\n```ini\n# WORK GITHUB SSH CONFIG\nHost work.github.com\n   HostName github.com\n   IdentityFile ~/.ssh/work_github_rsa\n   PreferredAuthentications publickey\n   IdentitiesOnly yes\n\n# OPEN SOURCE GITHUB SSH CONFIG\nHost oss.github.com\n    Hostname github.com\n    IdentityFile ~/.ssh/oss_github_rsa\n    PreferredAuthentications publickey\n    IdentitiesOnly yes\n```\n\n`~/.git_profiles`:\n\n```toml\n[gh-work]\nauthor = 'Full Name (at work)'\nemail = 'me@work.com'\nusername = 'MyWorkGithubOrganization'\nurl = 'git@work.github.com:{{username}}/{{project}}.git'\n\n[open-source]\nauthor = 'Full Name'\nemail = 'my.open.source.contribs@example.com'\nusername = 'my-oss-github-account'\nurl = 'git@oss.github.com:{{username}}/{{project}}.git'\n```\n\nYou can then `git clone ...` from using the correc key like ...\n\n### Generate remote URL\n\ngit-profile can be used to generate remote URLs for your repos. This can be helpful if you have a complicated SSH\nset-up that uses custom domains to use the right keys. Or just to save you having to navigate around GitHub Web\nand copy and paste remote URLs.\n\nGenerate a URL for a given project name:\n\n`git profile url project-name`\n\nUse `-p \u003cprofile-name\u003e` to generate using a different profile.\n\n`git profile url -p github-work your-project`\n\nThis is particularly handy when used in a sub-shell and combined with `git-remote`:\n\n`git remote add origin $(git profile url -p github-work my-work-project)`\n\n### Generate author string\n\n`git profile author` =\u003e 'Full Name \\\u003cyour@email.address\\\u003e'\n\nCan be used to easily fix commits when you've committed under the wrong profile:\n\n```sh\ngit commit -m \"Committing with the wrong user\"\ngit profile use github-work\ngit commit --amend --author $(git profile author)\n```\n\n### Edit profiles\n\n`git profile edit` opens your `.git_profiles` in `$EDITOR`. Defaults to `vim` if you don't have `$EDITOR` set.\n\n## Status\n\n*git-profile is in early development*. It's solves most of my major issues with using multiple identities with git, but it's by no means perfect.\nIf you run into a bug or have a feature request, please open an issue. It should work fine on Mac \u0026 Linux, it probably won't work as-is on Windows.\n\n## License\n\nMIT license, see `./LICENSE`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmfutcher%2Fgit-profile","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdmfutcher%2Fgit-profile","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmfutcher%2Fgit-profile/lists"}