{"id":48005422,"url":"https://github.com/b4nd/git-profile","last_synced_at":"2026-04-04T13:04:42.847Z","repository":{"id":275498791,"uuid":"926153506","full_name":"b4nd/git-profile","owner":"b4nd","description":"Git Profile is a CLI tool that streamlines managing multiple Git identities, letting you effortlessly create, update, and switch between profiles.","archived":false,"fork":false,"pushed_at":"2025-02-24T00:59:42.000Z","size":3721,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-24T01:26:24.605Z","etag":null,"topics":["cli","email","git","manager","managers","profile","profiles","username"],"latest_commit_sha":null,"homepage":"https://github.com/b4nd/git-profile","language":"Go","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/b4nd.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"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,"publiccode":null,"codemeta":null}},"created_at":"2025-02-02T17:20:14.000Z","updated_at":"2025-02-24T00:58:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"dac0948f-36a0-4061-92e7-4be564ae7af9","html_url":"https://github.com/b4nd/git-profile","commit_stats":null,"previous_names":["b4nd/git-profile"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/b4nd/git-profile","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b4nd%2Fgit-profile","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b4nd%2Fgit-profile/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b4nd%2Fgit-profile/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b4nd%2Fgit-profile/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/b4nd","download_url":"https://codeload.github.com/b4nd/git-profile/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b4nd%2Fgit-profile/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31400478,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T10:20:44.708Z","status":"ssl_error","status_checked_at":"2026-04-04T10:20:06.846Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["cli","email","git","manager","managers","profile","profiles","username"],"created_at":"2026-04-04T13:04:42.330Z","updated_at":"2026-04-04T13:04:42.836Z","avatar_url":"https://github.com/b4nd.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Git Profile\n\n[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)\n[![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n[![Go](https://github.com/b4nd/git-profile/actions/workflows/build.yml/badge.svg)](https://github.com/b4nd/git-profile/actions/workflows/build.yml)\n[![Go Report Card](https://goreportcard.com/badge/github.com/b4nd/git-profile)](https://goreportcard.com/report/github.com/b4nd/git-profile)\n[![codecov](https://codecov.io/gh/b4nd/git-profile/graph/badge.svg?token=LR1HAJ71CY)](https://codecov.io/gh/b4nd/git-profile)\n[![Release](https://img.shields.io/github/release/b4nd/git-profile.svg)](https://github.com/b4nd/git-profile/releases/latest)\n[![GitHub Releases Stats of git-profile](https://img.shields.io/github/downloads/b4nd/git-profile/total.svg?logo=github)](https://somsubhra.github.io/github-release-stats/?username=b4nd\u0026repository=git-profile)\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/3724fd18d1934563857274672e02f3fa)](https://app.codacy.com/gh/b4nd/git-profile/dashboard?utm_source=gh\u0026utm_medium=referral\u0026utm_content=\u0026utm_campaign=Badge_grade)\n[![Codacy Badge](https://app.codacy.com/project/badge/Coverage/3724fd18d1934563857274672e02f3fa)](https://app.codacy.com/gh/b4nd/git-profile/dashboard?utm_source=gh\u0026utm_medium=referral\u0026utm_content=\u0026utm_campaign=Badge_coverage)\n\n#### SonarCloud \n\n[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=b4nd_git-profile\u0026metric=bugs)](https://sonarcloud.io/summary/new_code?id=b4nd_git-profile)\n[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=b4nd_git-profile\u0026metric=code_smells)](https://sonarcloud.io/summary/new_code?id=b4nd_git-profile)\n[![Duplicated Lines (%)](https://sonarcloud.io/api/project_badges/measure?project=b4nd_git-profile\u0026metric=duplicated_lines_density)](https://sonarcloud.io/summary/new_code?id=b4nd_git-profile)\n[![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=b4nd_git-profile\u0026metric=ncloc)](https://sonarcloud.io/summary/new_code?id=b4nd_git-profile)\n[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=b4nd_git-profile\u0026metric=reliability_rating)](https://sonarcloud.io/summary/new_code?id=b4nd_git-profile)\n[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=b4nd_git-profile\u0026metric=security_rating)](https://sonarcloud.io/summary/new_code?id=b4nd_git-profile)\n[![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=b4nd_git-profile\u0026metric=sqale_index)](https://sonarcloud.io/summary/new_code?id=b4nd_git-profile)\n[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=b4nd_git-profile\u0026metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=b4nd_git-profile)\n[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=b4nd_git-profile\u0026metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=b4nd_git-profile)\n\n## Overview\n\nGit Profile is a command-line application developed in Go, designed to efficiently manage multiple Git profiles. It provides a suite of commands to create, update, delete, and switch between different user profiles, making it easier to handle various identities across diverse Git repositories. The commands also feature an interactive mode that prompts you for the necessary details, simplifying the setup process. This tool is particularly useful for developers who work on multiple projects with different user credentials.\n\n\n### Example Use Case\n\nImagine a developer working on both open-source and corporate projects. They need to switch between different Git profiles seamlessly to ensure commits are associated with the correct email and username. Instead of manually changing Git configurations every time, they can use `git profile` to quickly switch between predefined profiles, improving workflow efficiency.\nOnce you’ve configured a project profile,`git profile` will remember it the next time you work on that project, saving you the hassle of reconfiguration.\n\n#### Profile Storage\n\nBy default,`git profile` stores profiles in `$HOME/.gitprofile`. However, you can also store them locally by using the `--local` flag, which places a `.gitprofile` file in the current folder. This feature is especially useful for keeping project-specific settings right inside the repository.\n\n#### Where the selected profile is stored\n\ngit profile uses the .git/config file in each repository to store the selected profile. This way, there’s no need to reconfigure the profile every time you work on that repository, and it also ensures that the local name and user remain consistent for each project.\n\n![git profile](https://raw.githubusercontent.com/b4nd/git-profile/main/doc/git-profile.gif)\n\n## Commands Documentation\n\n| Command                   | Alias     | Flags                   | Description                                                |\n| ------------------------- | --------- | ----------------------- | ---------------------------------------------------------- |\n| `git profile current`     |           | `--global`,`--verbose`  | Displays the currently active profile.                     |\n| `git profile delete`      | `del`     | `--local`               | Deletes a specified profile from the system.               |\n| `git profile get`         |           | `--local`,`--verbose`   | Retrieves details of a specific profile.                   |\n| `git profile list`        | `ls`      | `--local`,`--verbose`   | Lists all available profiles.                              |\n| `git profile add`         | `create`  | `--local`               | Sets or updates a profile configuration.                   |\n| `git profile set`         | `use`     | `--global`              | Switches to a specific profile for operations.             |\n| `git profile unset`       | `unuse`   | `--global`              | Unsets the currently active profile.                       |\n| `git profile amend`       |           |                         | Updates email and name of the current profile last commit. |\n| `git profile version`     |           |                         | Displays the current version of the application.           |\n| `git profile help`        |           |                         | Displays help information for the application.             |\n\n### Flags\n\n- `--local` flag: Specifies that the operation should be performed on the local `.gitprofile` file.\n- `--global` flag: Specifies that the operation should be performed on the global `.gitconfig` file.\n- `--verbose` flag: Displays additional information about the current profile.\n\n## Installation\n\n### Linux\n\n```bash\ncurl -sL https://github.com/b4nd/git-profile/releases/download/v0.1.5/git-profile-v0.1.5-linux-amd64 -o git-profile\nchmod +x git-profile \nmv git-profile /usr/local/bin/\n```\n\n### macOS\n\n```bash\ncurl -sL https://github.com/b4nd/git-profile/releases/download/v0.1.5/git-profile-v0.1.5-darwin-amd64 -o git-profile\nchmod +x git-profile \nmv git-profile /usr/local/bin/\n```\n\n### Windows\n\n1. Download the latest Windows executable from the [releases page](https://github.com/b4nd/git-profile/releases).\n2. Extract the archive.\n3. Move the `git-profile-v0.1.5-darwin-amd64.exe` file to a directory in your system `PATH` and rename it to `git-profile.exe`.\n4. Optionally, add the directory to the system `PATH` environment variable for easier access.\n\n```powershell\n[System.Environment]::SetEnvironmentVariable(\"Path\", $Env:Path + \";C:\\\\path\\\\to\\\\git-profile\", [System.EnvironmentVariableTarget]::User)\n```\n\n## Usage\n\nTo use the application, run the following command:\n\n```bash\ngit profile [command] [flags]\n```\n\n### More Examples\n\n- **Create a new profile for a personal project:**\n\n  ```bash\n  git profile add personal --name \"Your Name\" --email \"name@example.com\"\n  ```\n\n  This command add up a new profile named `personal` with the given credentials.\n\n- **List all existing profiles:**\n\n  ```bash\n  git profile list\n  ```\n\n  Displays all available profiles currently stored.\n\n- **Set a specific profile:**\n\n  ```bash\n  git profile set personal\n  ```\n\n  Switches to the `personal` profile, applying its Git credentials.\n\n- **Check the currently active profile:**\n\n  ```bash\n  git profile current\n  ```\n\n  Shows which profile is currently in use.\n\n  \n- **Check the global current profile:**\n\n  ```bash\n  git profile current --global\n  ```\n\n  equivalent to `git config --global user.name` and `git config --global user.email`\n\n- **Amend the last commit with the active profile's details:**\n\n  ```bash\n  git profile amend\n  ```\n\n  Updates the latest commit with the email and name of the currently active profile.\n\n- **Unset the currently active profile:**\n\n  ```bash\n  git profile unset\n  ```\n\n  Removes the currently active profile, reverting to the default Git configuration.\n  \n- **Unset global current profile:**\n\n  ```bash\n  git profile unset --global\n  ```\n\n  equivalent to `git config --global --unset user.name` and `git config --global --unset user.email`\n  \n- **Remove a profile:**\n\n  ```bash\n  git profile delete personal\n  ```\n\n  Deletes the `personal` profile.\n\n\n## Environment variables\n\n| Variable           | Description                                                                               |\n| ------------------ | ----------------------------------------------------------------------------------------- |\n| `GIT_PROFILE_PATH` | The path to the directory where the profiles are stored. Default is `$HOME/.gitprofile`. |\n\n### Configuring GIT\\_PROFILE\\_PATH in `.zshrc` or `.bashrc`\n\nIf you want to specify a custom location for the Git Profile configuration, you can set the `GIT_PROFILE_PATH` environment variable in your shell configuration file.\n\nFor Windows Subsystem for Linux (WSL), you can add the following lines to your `~/.zshrc` or `~/.bashrc`:\n\n```bash\n# Example of a shared Git profile on Windows through WSL\nexport GIT_PROFILE_PATH=\"/mnt/c/Users/\u003cUSER\u003e/.gitprofile\"\n```\n\nAfter adding the line, apply the changes by running:\n\n```bash\nsource ~/.zshrc  # If using zsh\nsource ~/.bashrc  # If using bash\n```\n\n## DevContainer Support\n\nThis project includes support for **DevContainers**, allowing developers to quickly set up a consistent development environment using **VS Code Remote - Containers** or **GitHub Codespaces**.\n\n### How to Use\n\n1. Ensure you have **Docker** installed and running.\n2. Open the project in **VS Code**.\n3. Install the **Dev Containers** extension if you haven't already.\n4. Open the Command Palette (`Ctrl+Shift+P` or `Cmd+Shift+P` on macOS) and select `Remote-Containers: Reopen in Container`.\n\nThis will automatically set up all dependencies and configurations needed for development.\n\n## Requirements\n\n- [Go](https://golang.org/) v1.23.6\n- [Taskfile](https://taskfile.dev/) v3.41.0\n- [golangci-lint](https://golangci-lint.run/) v1.63.4\n- [gosec](https://github.com/securego/gosec/) v2.22.0\n- [Git](https://git-scm.com/)\n\n## Build\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/b4nd/git-profile.git\n   ```\n2. Change into the project directory:\n   ```bash\n   cd git-profile\n   ```\n3. Install the dependencies:\n   ```bash\n   go mod tidy\n   ```\n4. Run the tests:\n   ```bash\n   task test\n   ```\n5. Run the following command to install the application:\n   ```bash\n   task build\n   ```\n\nbuild output will be in the `bin` directory.\n\n## Example usage during development\n\nBelow are examples of how to use each command, along with explanations of their purpose:\n\n- **Set a new profile:**\n\n  ```bash\n  task run -- add \\\n     --workspace company \\\n     --name \"Your Name\" \\\n     --email \"name@example.com\"\n  ```\n\n  This command creates a new Git profile under the workspace `company`, assigning the specified name and email.\n\n- **List all profiles:**\n\n  ```bash\n  task run -- list\n  ```\n\n  Displays all available Git profiles configured in the system.\n\n- **Switch to a specific profile:**\n\n  ```bash\n  task run -- set company\n  ```\n\n  Activates the Git profile associated with `company`, ensuring that subsequent Git commits use the corresponding credentials.\n\n- **Check the currently active profile:**\n\n  ```bash\n  task run -- current\n  ```\n\n  Shows the details of the currently active Git profile, including name and email.\n\n## Contributing\n\n1. Fork the repository.\n2. Create a new branch:\n   ```bash\n   git checkout -b feature-name\n   ```\n3. Commit your changes:\n   ```bash\n   git commit -m 'Add new feature'\n   ```\n4. Push to the branch:\n   ```bash\n   git push origin feature-name\n   ```\n5. Open a pull request.\n\n## Authors\n\n- [Juan Manuel Garcia](https://github.com/b4nd/me)\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n## Acknowledgements\n\n[![SonarQube Cloud](https://sonarcloud.io/images/project_badges/sonarcloud-light.svg)](https://sonarcloud.io/summary/new_code?id=b4nd_git-profile)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fb4nd%2Fgit-profile","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fb4nd%2Fgit-profile","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fb4nd%2Fgit-profile/lists"}