Hello there~ https://youtu.be/eaEMSKzqGAg
A simple command line utility to help you initialize git repositories locally!
I have multiple gpg keys and git emails on my machine and it was tedious to clone, configure git, and make sure everything works every time. This package makes my life much easier. The NPM package is just a wrapped around my script, you can copy it, modify it however you like, the limit's the sky!
npm i -g @kl13nt/initrepo
# or
yarn global add @kl13nt/initrepo
Why global? Because you want to run it anywhere.
- gpg
- git
- Choose between creating a directory for the repo or initializing in
cwd
- Lists gpg keys interactively for you to choose
- Specify commit author email
- Automatically add a remote
If you use gpg or have it enabled through the Git Bash it will only be available in that environment. Make sure to explicitly install GnuGPG or use the package through Git Bash.
If you installed GnuGPG explicitly outside of Git Bash you'll be able to use it from any terminal, but it won't have the keys configured with Git Bash.
Make sure the package has permission to execute gpg and that it can access the keys
in the same terminal. To confirm the keys exist in the current terminal run gpg --list-secret-keys --keyid-format=long
.
To fix this make sure to configure gpg with new keys or move them by exporting them from Git Bash and importing them on the other executable. Google is your best friend on this.
I tested this on the latest Windows 10 build. It should work on other versions of windows AND linux distros with NodeJS > 12 installed.
I welcome all contributions! Feel free to open an issue or submit a PR! π
This project is licensed under MIT. Refer to LICENSE for more details.