MCPcopy Index your code
hub / github.com/dmfutcher/git-profile

github.com/dmfutcher/git-profile @v0.1.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.1.0 ↗ · + Follow
26 symbols 52 edges 1 files 1 documented · 4%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

git-profile

git-profile is a simple user profile manager for git. It lets you set-up multiple user profiles for git & switch between them, generate remote URLs and more. If you ever have to manage multiple identities with git, git-profile can make your life easier.

Usage

git-profile should be installed as a binary named git-profile. The git- prefix means we can use it like any other git command.

Create a profile

At a minimum you need a profile name (best to keep this quite short), your author name and author email.

git profile add github 'Forename Surname' 'open-source@personal.com'

Create a profile with a custom URL scheme:

git profile add github-work 'Forename Surname' 'forename@work.com' --username CompanyName --remote 'git@github.com-work:{{username}}/{{project}}.git'

Switch profiles

The use command switches you between profiles. This sets the profile for the repository in your current working directory.

git profile use github-work

git profile use open-source

List profiles

List all the profiles. An asterisk will appear next to the currently enabled profile.

git profile ls

Generate remote URL

git-profile can be used to generate remote URLs for your repos. This can be helpful if you have a complicated SSH set-up that uses custom domains to use the right keys. Or just to save you having to navigate around GitHub Web and copy and paste remote URLs.

Generate a URL for a given project name:

git profile url project-name

Use -p <profile-name> to generate using a different profile.

git profile url -p github-work your-project

This is particularly handy when used in a sub-shell and combined with git-remote:

git remote add origin $(git profile url -p github-work my-work-project)

Generate author string

git profile author => 'Forename Surname \<your@email.address>'

Can be used to easily fix commits when you've committed under the wrong profile:

git commit -m "Committing with the wrong user"
git profile use github-work
git commit --amend --author $(git profile author)

Edit profiles

git profile edit opens your .git_profiles in $EDITOR. Defaults to vim if you don't have $EDITOR set.

Status

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. If you run into a bug or have a feature request, please open an issue. It should work fine on Mac & Linux, it probably won't work as-is on Windows.

License

MIT license, see ./LICENSE.

Core symbols most depended-on inside this repo

profiles_file_path
called by 3
src/main.rs
git_command
called by 3
src/main.rs
get_profile
called by 2
src/main.rs
get_profile_in_local_use
called by 2
src/main.rs
with_profile
called by 2
src/main.rs
with_remote_url
called by 1
src/main.rs
with_username
called by 1
src/main.rs
as_map
called by 1
src/main.rs

Shape

Method 21
Class 3
Function 2

Languages

Rust100%

Modules by API surface

src/main.rs26 symbols

For agents

$ claude mcp add git-profile \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact