git-idm-npm is a command line interface based git identity manager.
npm install -g git-idm-npm
npm install -g https://github.com/Kireobat/git-idm-npm.git
- Download the git repository
- Either download it as a zip file and unzip it, or
- run
git clone https://github.com/Kireobat/git-idm-npm.git
- Install it from the files you downloaded
- run
npm install -g path/to/files
- run
This script has been confirmed to work on:
- Windows
- 10
- 11
- Linux
- MacOS
If you get the following error message:
git-idm : File C:\path\to\nodejs\git-idm.ps1 cannot be loaded because running scripts is disabled on this system.
For more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
+ git-idm list
+ ~~~~~~~
+ CategoryInfo : SecurityError: (:) [], PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
The solution is to follow the path spesified at the beginning of
the error message C:\path\to\nodejs\git-idm.ps1
and delete the following file: git-idm.ps1
Commands are sorted alphabetically
git-idm help
or
git-idm <command> --help
is availiable and provides more or less the same info as below.
- displays the active git identity
- adds a new git identity
- arguments:
- --name=""
- alias: --n=""
- required
- string
- --email=""
- alias: --e=""
- required
- string
- --alias=""
- alias: --a=""
- optional
- string
- --name=""
- adds or changes an alias
- arguments:
- --alias=""
- alias: --a=""
- required
- string
- --name=""
- alias: --n=""
- required
- string
- --alias=""
- lists every saved identity
- deletes a git identitiy
- arguments:
- --name=""
- aliases: --n="" --a="" --alias=""
- required
- string
- --name=""
- set git identity for current repository or globally
- arguments:
- --name=""
- aliases: --n="" --a="" --alias=""
- required
- string
- --global
- alias: --g
- optional
- boolean
- --name=""