{"id":13707109,"url":"https://github.com/gesquive/git-user","last_synced_at":"2025-04-14T08:42:15.684Z","repository":{"id":57526482,"uuid":"63816673","full_name":"gesquive/git-user","owner":"gesquive","description":"Git plugin that allows you to save multiple user profiles and set them as project defaults","archived":false,"fork":false,"pushed_at":"2022-03-26T02:23:47.000Z","size":51,"stargazers_count":47,"open_issues_count":1,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T22:13:19.732Z","etag":null,"topics":["git","git-addons","git-plugin"],"latest_commit_sha":null,"homepage":"","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/gesquive.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2016-07-20T21:43:59.000Z","updated_at":"2024-11-15T19:02:16.000Z","dependencies_parsed_at":"2022-09-07T02:51:52.333Z","dependency_job_id":null,"html_url":"https://github.com/gesquive/git-user","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gesquive%2Fgit-user","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gesquive%2Fgit-user/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gesquive%2Fgit-user/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gesquive%2Fgit-user/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gesquive","download_url":"https://codeload.github.com/gesquive/git-user/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248849387,"owners_count":21171570,"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-addons","git-plugin"],"created_at":"2024-08-02T22:01:19.718Z","updated_at":"2025-04-14T08:42:15.664Z","avatar_url":"https://github.com/gesquive.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# git-user\n[![Software License](https://img.shields.io/badge/License-MIT-orange.svg?style=flat-square)](https://github.com/gesquive/git-user/blob/master/LICENSE)\n[![GoDoc](https://img.shields.io/badge/godoc-reference-blue.svg?style=flat-square)](https://pkg.go.dev/github.com/gesquive/git-user)\n[![Build Status](https://img.shields.io/circleci/build/github/gesquive/git-user?style=flat-square)](https://circleci.com/gh/gesquive/git-user)\n[![Coverage Report](https://img.shields.io/codecov/c/gh/gesquive/git-user?style=flat-square)](https://codecov.io/gh/gesquive/git-user)\n\nGit plugin that allows you to save multiple user profiles and set them as project defaults\n\n### Why?\nI created this because I have multiple emails that I use for work, personal, and open source projects and I would find myself checking into a git project with the wrong profile. Instead of manually changing the git config for a project every time, this was much easier.\n\n## Installing\n\n### Compile\nThis project requires go1.18+ to compile. Just run `go install github.com/gesquive/git-user@latest` and the executable should be built for you automatically in your `$GOPATH`.\n\nOptionally you can run `make install` to build and copy the executable to `/usr/local/bin/` with correct permissions.\n\n### Download\nAlternately, you can download the latest release for your platform from [github](https://github.com/gesquive/git-user/releases/latest).\n\nOnce you have an executable, make sure to copy it somewhere on your path like `/usr/local/bin` or `C:/Program Files/`.\nIf on a \\*nix/mac system, make sure to run `chmod +x /path/to/git-user`.\n\n### Homebrew\nThis app is also avalable from this [homebrew tap](https://github.com/gesquive/homebrew-tap). Just install the tap and then the app will be available.\n```shell\n$ brew tap gesquive/tap\n$ brew install git-user\n```\n\n## Usage\n\nIf the `git-user` executable is placed on the path, it can be used as a git command. For example, you would be able to run the command `git user list` to list all of the configured users.\n\n\n```console\ngit-user lets you quickly switch between multiple git user profiles\n\nUsage:\n  git-user [flags] [command]\n\nAvailable Commands:\n  add         Add a new profile\n  del         Delete a profile\n  edit        Edit a profile\n  list        List all saved profiles\n  rm          Remove a profile from the current project\n  set         Set the profile for the current project\n\nFlags:\n  -c, --config string     config file (default \"~/.git-profiles\")\n  -g, --git-path string   The git executable to use (default \"git\")\n  -p, --path string       The project to get/set the user (default \"$CWD\")\n  -V, --version           Show the version and exit\n```\n\nOptionally, a hidden debug flag is available in case you need additional output.\n```console\nHidden Flags:\n  -D, --debug                  Include debug statements in log output\n```\n\n## QuickStart\n\n```console\n$ cd /path/to/git/project\n\n# add a work profile for Henry\n$ git user add work \"Dr. Henry Jekyll\" henry@jekyll.com\nAdded profile 'work'\n\n# add a personal profile for Edward\n$ git user add home \"Edward Hyde\" hyde@night.com\nAdded profile 'home'\n\n# list out our saved profiles\n$ git user list\nGlobal Profile:\n  User: Henry \u003chjekyll@gmail.com\u003e\n\nSaved Profiles:\n  home: Edward Hyde \u003chyde@night.com\u003e\n  work: Dr. Henry Jekyll \u003chenry@jekyll.com\u003e\n\n# set the current git repository user to the home profile\n$ git user set home\nThe user for the 'project' repository has been set too 'Edward Hyde \u003chyde@night.com\u003e'\n\n# list profiles again, notice how the current repository profile is now set\n$ git user\nProject Profile:\n  Path: /path/to/git/project\n  User: Edward Hyde \u003chyde@night.com\u003e\n\nSaved Profiles:\n  home: Edward Hyde \u003chyde@night.com\u003e\n  work: Dr. Henry Jekyll \u003chenry@jekyll.com\u003e\n```\n\n\n## Documentation\n\nThis documentation can be found at github.com/gesquive/git-user\n\n## License\n\nThis package is made available under an MIT-style license. See LICENSE.\n\n## Contributing\n\nPRs are always welcome!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgesquive%2Fgit-user","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgesquive%2Fgit-user","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgesquive%2Fgit-user/lists"}