Git

Making a GPG Key

Check for already existing GPG gpg --list-secret-keys --keyid-format LONG Generate a key(_If not exist in #1 _) gpg --gen-key Default Selections are RSA 4096. Enter for unlimited validity or, be paranoid. Enter Real Name, Email, Comment to set the hash. Check the list to see if key exists now gpg --list-secret-keys --keyid-format LONG If exists, use the KeyID such as 3EC4B8420416E86B like this, to get the GPG Key »

Removing Submodule

Remove the submodule entry from .git/config1 git submodule deinit -f path/to/submodule Remove the submodule directory from the superproject’s .git/modules directory1 rm -rf .git/modules/path/to/submodule Remove the entry in .gitmodules and remove the submodule directory located at path/to/submodule1 git rm -f path/to/submodule Remove cached entries; Delete .gitmodules before doing this, if it hasn’t deleted already2 rm -rf path/to/submodule »

Setting Up Git With SSH

First check existing SSH keys1 ls -al ~/.ssh Then generate one, if necesary1 ssh-keygen -t rsa -b 4096 -C "siddhantrimal@hotmail.com" to store this in the global context, provide this filepath: /c/Users/Siddhant/.ssh/id_rsa Copy the SSH key to clipboard2 clip < ~/.ssh/id_rsa.pub Now login to your github account and, while logged in, open this link https://github.com/settings/keys on the next tab and paste the key from your clipboard. Henceforth, use the SSH address of your repository to use it. »

comments powered by Disqus