3 ms·
There's a project to do this properly, but integrating this on git itself would be great. it's just a shell script really: https://github.com/madx/git-identity
by JetSpiegel 7y ago
There's a project to do this properly, but integrating this on git itself would be great. it's just a shell script really:
https://github.com/madx/git-identity https://github.com/madx/git-identity
It's already on AUR:
https://aur.archlinux.org/packages/git-identity-git/ https://aur.archlinux.org/packages/git-identity-git/
- JetSpiegel 7y agoTo clarify, this has a better API and integrates cleanly with git itself. $ git identity -h usage: git identity [-d | --define] <identity> <name> <email> [<ssh-file>] [<gpgkeyid>] or: git identity [-p | --print] [<identity>] or: git identity [-s | --get-settings] or: git identity [-r | --remove] <identity> or: git identity [-l | --list] or: git identity [-R | --list-raw] or: git identity [--define-gpg] <gpgkeyid> or: git identity [--define-ssh] <ssh-file> [<ssh-verbosity>] or: git identity [-u | --update] or: git identity [-c | --get-shell-command] [<identity>] [<command>] or: git identity <identity> So you can define identities such as `work`, `personal`, and then after cloning/init, run `git identity personal` to setup GPG or SSH keys, name and email.