git-profile
This command-line tool allows you to define a set of configuration profiles that can be applied on a per-repository basis. The main use case is to swap the user details and signing key, but it's not limited to just that.
Installation
We recommend installing the tool with Pipx.
$ pipx install git-profile
Configuration
In ~/.gitconfig, prefixing section names with <Profile>. assigns them to the specified profile.
Git-profile can use that information to determine which profiles there are and what configuration
is associated with it.
Example:
[Work.user]
email = "me@work.com"
signingkey = DEADBEEFDEADBEEF
Usage
Run git profile to list available profiles. The current profile will be marked with a star. Note
that the default profile is always present and represents your normal Git configuration without
profile overrides.
$ git profile
* default
Work
With git profile <Profile> you can switch to the specified profile.
$ git profile Work
Switched to profile "Work".
The changes will be applied to .git/config of the current repository.
You can add the --diff option to print a diff of the applied config changes.
FAQ
How do I avoid accidentally forgetting to switch my profile after checking out a repository?
You can leave the [user] section of your default configuration empty. That way Git will prompt
you to configure it when trying to commit. Simply run git profile <Profile> after that and
commit again.
Vendored Libraries
gitconfigparser.pyby looking-for-a-job @ GitHub
Copyright © 2012 Niklas Rosenstein
Metadata
Release files for git-profile 1.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| git_profile-1.1.4.tar.gz | 9.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| git_profile-1.1.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 20.9 kB
Release files / git_profile-1.1.4.tar.gz
| Download URL | git_profile-1.1.4.tar.gz |
|---|---|
| Size | 9.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4e66f89978f399478c8fe24f01a75e1cf2cb705144fa33fdb10c41bf3ce06f0a
|
|
BLAKE2b-256 checksum How to use checksums |
dde0df5cb19d9563a8673b58a4f44a839acba9f9e2465bdd571d947ddfeccf56
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 27, 2025.
Transparency logRelease files / git_profile-1.1.4-py3-none-any.whl
| Download URL | git_profile-1.1.4-py3-none-any.whl |
|---|---|
| Size | 11.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e8cdb7ad6bf26698d8e4be94935e34f09309363dfe383230ae535abe1e861767
|
|
BLAKE2b-256 checksum How to use checksums |
5b11cfa0178cd63860ea54f3d14dc2a9075c1e0e2ab7d797cfe293be1b6d58fd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 27, 2025.
Transparency log