|Niklas Rosenstein 89696f2b6a||8 months ago|
|.changelog||8 months ago|
|src/git_profile_command||8 months ago|
|.gitignore||8 months ago|
|LICENSE.txt||2 years ago|
|MANIFEST.in||8 months ago|
|README.md||8 months ago|
|mypy.ini||8 months ago|
|package.yml||8 months ago|
|setup.py||8 months ago|
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.
We recommend installing the tool with Pipx.
$ pipx install git-profile
~/.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.
[Work.user] email = "email@example.com" signingkey = DEADBEEFDEADBEEF
git profile to list available profiles. The current profile will be marked with a star. Note
default profile is always present and represents your normal Git configuration without
$ git profile * default Work
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.
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
gitconfigparser.pyby looking-for-a-job @ GitHub
Copyright © 2012 Niklas Rosenstein