All Projects → madx → Git Identity

madx / Git Identity

Licence: wtfpl
Manage your identity in Git

Programming Languages

shell
77523 projects

Labels

Projects that are alternatives of or similar to Git Identity

Summernote Image Attributes
Summernote plugin to edit image attributes
Stars: ✭ 78 (-4.88%)
Mutual labels:  plugin
Xcodecolorsense
🎈 An Xcode plugin that makes working with color easier
Stars: ✭ 79 (-3.66%)
Mutual labels:  plugin
Sentinl
Kibana Alert & Report App for Elasticsearch
Stars: ✭ 1,233 (+1403.66%)
Mutual labels:  plugin
Comet Cache
An advanced WordPress® caching plugin inspired by simplicity.
Stars: ✭ 78 (-4.88%)
Mutual labels:  plugin
Pluginapplication
学习Android插件化必备demo
Stars: ✭ 79 (-3.66%)
Mutual labels:  plugin
Betterdiscordapp
Better Discord App enhances Discord desktop app with new features.
Stars: ✭ 1,225 (+1393.9%)
Mutual labels:  plugin
Kibananestedsupportplugin
A plugin for Kibana 5.5 and beyond that adds support for nested field search and aggregation.
Stars: ✭ 78 (-4.88%)
Mutual labels:  plugin
Magane
Bringing LINE's sticker to Discord in a chaotic way.
Stars: ✭ 81 (-1.22%)
Mutual labels:  plugin
Vue Rawmodel
RawModel.js plugin for Vue.js v2. Form validation has never been easier!
Stars: ✭ 79 (-3.66%)
Mutual labels:  plugin
Obs Gnome Screencast
GNOME Screen Cast OBS Studio plugin
Stars: ✭ 80 (-2.44%)
Mutual labels:  plugin
Xcactionbar
"Alfred for Xcode" plugin
Stars: ✭ 1,217 (+1384.15%)
Mutual labels:  plugin
Awesome Typescript Ecosystem
😎 A list of awesome TypeScript transformers, plugins, handbooks, etc
Stars: ✭ 79 (-3.66%)
Mutual labels:  plugin
Hidden Secrets Gradle Plugin
🔒 Deeply hide secrets on Android
Stars: ✭ 79 (-3.66%)
Mutual labels:  plugin
Httpie Oauth
OAuth plugin for HTTPie
Stars: ✭ 78 (-4.88%)
Mutual labels:  plugin
Phantom
Phantom — 唯一零 Hook 稳定占坑类 Android 热更新插件化方案
Stars: ✭ 1,238 (+1409.76%)
Mutual labels:  plugin
Homebridge Weather
OpenWeatherMap Plugin for Homebridge
Stars: ✭ 78 (-4.88%)
Mutual labels:  plugin
Craft Async Queue
Async Queue Handler for Craft 3
Stars: ✭ 80 (-2.44%)
Mutual labels:  plugin
Levelgenerator
Unity plug-in for procedurally generating indoor levels using abstract chunks.
Stars: ✭ 82 (+0%)
Mutual labels:  plugin
Nodejs Ue4
Embed node.js as an unreal plugin.
Stars: ✭ 82 (+0%)
Mutual labels:  plugin
Tensorboard Empty Scalar Hider
Chrome Extension of hiding empty scalar/panes in TensorBoard.
Stars: ✭ 81 (-1.22%)
Mutual labels:  plugin

git-identity

You often use Git in different contexts, like at work and for open-source projects. You may then want to use different user names/email pairs to identify yourself.

This is not an important part of your work, and setting this up should be really fast. That's where git-identity comes in: setting up your identity information only takes one command with it.

Note: Identities are stored in the global git config. Using an identity copies the setting in the local repo git configuration. If you are changing the global config for one identity does NOT propagate the changes to the local repos. You will have use git identity --update in the repo folder to update the identity.

Installing

Simply link or copy the git-identity in a directory that's in your PATH, Git will pick it up and make it available as git identity.

$ ln -s git-identity ~/bin/git-identity

Under Windows, go to System > Advanced System Parameters > Environment Variable. Find the "Path" entry under system variables and add the path to where you downloaded git-identity.

Then you may setup a default identity with the following command (see Usage for more information):

$ git identity --define default Me [email protected]

To get bash completion, just source the git-identity.bash-completion file in your initialization scripts, such as .bashrc.

To get zsh completion, move the git-identity.zsh-completion file to a location present in your $FPATH, renaming the file to _git-identity.

You can also use basher to install git-identity:

$ basher install madx/git-identity

Usage

Add an identity:

$ git identity --define <identity name> <user name> <user email> [<ssh-file>] [<gpgkeyid>]

Add a GPG key to the identity (see GPG specific information below)

$ git identity --define-gpg <identity name> <gpgkeyid>
Added GPG key DA221397A6FF5EZZ to [default] user <[email protected]> (GPG key: DA221397A6FF5EZZ)

Add a SSH key to the identity

$ git identity --define-ssh <identity name> <ssh-file>
Added SSH key id_rsa_anotheraccount to [default] user <[email protected]> (SSH key: id_rsa_anotheraccount)

Print the current identity:

$ git identity
Current identity: [default] user <[email protected]>

Change identity:

$ git identity user2
Using identity: [default2] user2 <[email protected]>

Update identity:

$ git identity --update
Using identity: [user] First Last <[email protected]> (SSH key: id_rsa_user_new_key)
These are the changes:
1,2c1,2
<   core.sshcommand ssh  -i ~/.ssh/id_rsa_user
<   user.email [email protected]
---
>   core.sshcommand ssh  -i ~/.ssh/id_rsa_user_new_key
>   user.email [email protected]

List all identities:

$ git identity --list
Available identities:
[default] user <[email protected]>
[default2] user2 <[email protected]>

Listing raw identities:

$ git identity --list-raw
default
default2

Deleting an identity:

$ git identity --remove <identity name>

Printing the raw identity (for use in scripts)

$ git identity --print
$ git identity --print <identity name>

Priniting the local settings

$ git identity --get-settings
core.sshcommand ssh -i ~/.ssh/id_rsa_user
user.email [email protected]
user.identity user
user.name First Last

Retriving GIT_SSH_COMMAND or running command with that in the environment:

$ git identity -c my_other_identity
GIT_SSH_COMMAND="ssh -i ~/.ssh/id_rsa_myotheridentity"

$ git identity -c my_other_identity git clone [email protected]:me/myrepo.git
Cloning into 'myrepo'...

Setting up GPG

More information about how to use GPG with git-identity may be found in GPG_SETUP.md

Setting up SSH

If you have a valid SSH key associate to the agent you do not have to do anything beside git identity --define-ssh <identity name> <ssh-file>.

This sets core.sshCommand="ssh -i ~/ssh/ssh-file" in the local git config when using that identity

Creating a new identity

    ssh-keygen -t rsa -b 4096 -C "[email protected]" -f ~/.ssh/id_rsa_anotheraccount
ssh-add id_rsa_anotheraccount

Debugging a ssh connection problem

git identity --define-ssh <identity name> <ssh-file> <verbosity>

With verbosity=1 it will use ssh -v. With verbosity=2 it will use ssh -vvv.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].