:trident: A command line tool allowing for easy shifting between git identities (username, email, and GPG).
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Luiserebii 78e1454efb
Docs script now working in generating .nojekyll for us!
3 months ago
.circleci Another attempt, this time following https://github.com/codecov/example-typescript 3 months ago
docs Docs script now working in generating .nojekyll for us! 3 months ago
scripts Docs script now working in generating .nojekyll for us! 3 months ago
src Adding in typedoc, and documentation generation script 3 months ago
test Just a small edit that will cause this test to pass, just needed to update import 3 months ago
.eslintrc.js Moving back to single quotes as default for strings, and fixing up some max-line linter errors 3 months ago
.gitignore Ahhh, has to be in root of docs dir... we need to modify the script, is the only thing, touch is not working, only got this working by moving .nojekyll over from root project dir to docs dir 3 months ago
.npmignore Adding docs to .npmignore 3 months ago
.nycrc Did I forget to cimmit the .nycrc...? Oops, might be why not running correctly 3 months ago
INSTALL Adding INSTALL and UPDATE scripts 3 months ago
LICENSE Adding LICENSE 5 months ago
README.md Updating README with dev docs 3 months ago
UPDATE Updating UPDATE script (:P) 3 months ago
git-identity Further moving to .ts, meta.ts compiles with no issue, @types/node added as dev dependency 4 months ago
package-lock.json Adding in typedoc, and documentation generation script 3 months ago
package.json Docs script now working in generating .nojekyll for us! 3 months ago
tsconfig.json Another attempt, this time following https://github.com/codecov/example-typescript 3 months ago

README.md

git-identity

git-identity-logo

npm version GitHub CircleCI Total alerts

A command line tool allowing for easy shifting between git identities (username, email, and GPG).

Version: 0.5.1-alpha
Author: Luiserebii

Usage

Usage: git-identity [options]

Options:
  -v, --version          output the version number
  -a, --about            about this tool
  -l, --list             list all registered identities
  -n, --new <name> *     add new identity
  -u, --update <name> *  update registered identity
  -d, --delete <name>    delete registered identity
  -s, --shift <name>     shift git identity to registered identity (global by default)
  -c, --current          current global git identity
  --global               global (option for -s and -c)
  --local                local (option for -s and -c)
  --user <username>      specify username
  --email <email>        specify email
  --gpg-key <gpg-key>    specify GPG key (key-id format: LONG)
  -h, --help             output usage information

* uses additional flags below: 
--user, --email, --gpg-key
Usage: clone [options] [repo]

Clone a repository and set the identity locally within. All flags accepted by git clone can also be used with this tool, and more information on their usage can be found within the git-scm documentation.

Options:
  -i, --identity <name>            name of the git-identity to use
  -v, --verbose                    be more verbose
  -q, --quiet                      be more quiet
  --progress                       force progress reporting
  -n, --no-checkout                don't create a checkout
  --bare                           create a bare repository
  --mirror                         create a mirror repository (implies bare)
  -l, --local                      to clone from a local repository
  --no-hardlinks                   don't use local hardlinks, always copy
  -s, --shared                     setup as shared repository
  --recursive                      initialize submodules in the clone
  --recurse-submodules             initialize submodules in the clone
  --template <template-directory>  directory from which templates will be used
  --reference <repo>               reference repository
  --dissociate                     use --reference only while cloning
  -o, --origin <name>              use <name> instead of 'origin' to track upstream
  -b, --branch <branch>            checkout <branch> instead of the remote's HEAD
  -u, --upload-pack <path>         path to git-upload-pack on the remote
  --depth <depth>                  create a shallow clone of that depth
  --single-branch                  clone only one branch, HEAD or --branch
  --separate-git-dir <gitdir>      separate git dir from working tree
  -c, --config <key=value>         set config inside the new repository
  -h, --help                       output usage information
Usage: revise [options]

Revise the current git repository's history.

Options:
  --debug              debug mode - print the command that will be run
  --old-identity <id>  identity to change (no need to specify --old-email/--old-name if using)
  --new-identity <id>  identity to change to (no need to specify --new-email/--new-name if using)
  --old-email <email>  email to change
  --old-name <name>    name to change
  --new-email <email>  new email to change to
  --new-name <name>    new name to change to
  -h, --help           output usage information

Installation

Linux

To install, simply extract the tool into a preferred directory, compile, and create a soft link. For example, if you are looking to place the tool in your home directory:

unzip git-identity-0.5.1-alpha.zip -d ~/
cd ~/git-identity-0.5.1-alpha
npm install
npm run build
sudo chmod u+x ~/git-identity-0.5.1-alpha/git-identity
sudo ln -s ~/git-identity-0.5.1-alpha/git-identity /usr/local/bin/git-identity

Doing this should make it globally accessible via git-identity.

Alternatively, there is an INSTALL and UPDATE script, the latter of which should take any registered identities you had in the previous install and copy them over. NOTE: These are still untested and could break easily; until test cases are released for these, tread with caution.

Mirror

A mirror of this repository is available at: https://serebii.io:2501/Luiserebii/git-identity

Developer Documentation

Documentation for developers may be found at: https://luiserebii.github.io/git-identity

Contact

Questions? Comments? Suggestions?
Open an issue, make a pull request!

Or, you can email me at: luis@serebii.io