# @jsumners/git-user-config

> Configure your git user for current repo

Latest version **2.3.0** (published 2017-10-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install @jsumners/git-user-config
pnpm add @jsumners/git-user-config
yarn add @jsumners/git-user-config
bun add @jsumners/git-user-config
```

Provides the command `git-user-config`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.3.0 |
| Published | 2017-10-25 |
| First published | 2017-10-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | palortoff |
| Maintainers | jsumners |

## Links

- npm: https://www.npmjs.com/package/@jsumners/git-user-config
- Repository: https://github.com/palortoff/git-user-config
- Homepage: https://github.com/palortoff/git-user-config#readme
- Issues: https://github.com/palortoff/git-user-config/issues
- npm.io page: https://npm.io/package/@jsumners/git-user-config

## Dependencies (4)

- [read](https://npm.io/package/read.md) ^1.0.7
- [minimist](https://npm.io/package/minimist.md) ^1.2.0
- [json-colorizer](https://npm.io/package/json-colorizer.md) ^1.1.0
- [consoleplusplus](https://npm.io/package/consoleplusplus.md) ^1.4.1

## Recent versions

- 2.3.0 (latest) — 2017-10-25
- 2.2.0 — 2017-10-24
- 2.1.0 — 2017-10-23
- 2.0.1 — 2017-10-20
- 2.0.0 — 2017-10-20

## README

Do you use different user names and/or email for your github projects, work
projects, private personal projects?

Then you use ``git config`` a lot.

With ``git-user-config`` you can save these different users globally and
configure a new repo with a single command using record identifiers.
No more misspelled email addresses and user names...

# Install

`npm install -g git-user-config`

# Add User record for later use

`git-user-config --add`

Then follow instructions

```sh
Add new user record

Identifier: personal

Enter property names like `user.email`
Property name (none to end): user.name
Value: Joe Schmo
Property name (none to end): user.email
Value: joe@example.com
Property name (none to end):

record saved
```

# Configure git repo to use user record

`git-user-config --set user1`

This will call `git config --local` for each property of the `user1`
configuration.

````
$ git config -l | grep user
user.name=user 1
user.email=user_1@domain.com
````

# List all user records

    git-user-config --list

````
{
  "user1": {
    "user.name": "user 1",
    "user.email": "user_1@domain.com"
  },
  "user2": {
    "user.name": "user 2",
    "user.email": "user_2@domain.com"
  }
}
````

# Update a user record

`git-user-config --update user1`

This will interactively allow updating of the `user1` record. The process
works the same as `--add user1`. Any existing properties specified will be
overwritten, or removed if the new value is `~del~`, and new properties will
be merged in.

# Remove a user record

`git-user-config --remove user1`

---
_Source: https://npm.io/package/@jsumners/git-user-config · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
