Last active
August 20, 2023 01:05
-
-
Save JonnyTech/b8b3e2e9c61e50f6abc0740b85124728 to your computer and use it in GitHub Desktop.
git guide
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh-keygen -t ed25519 -C "name[at]domain[dot]tld" | |
>> keyfile ie /home/user/.ssh/github | |
>> passphrase and confirm | |
https://github.com/settings/ssh/new | |
cat /home/user/.ssh/github | |
>> authentication key | |
eval "$(ssh-agent -s)" | |
ssh-add ~/.ssh/github | |
ssh -vT [email protected] | |
gpg -K --keyid-format SHORT | |
gpg --full-generate-key | |
gpg --list-secret-keys --keyid-format=long | |
>> long string at and of sec value | |
gpg --armor --export <sec value> | |
>> copy whole block including ---'s | |
https://github.com/settings/gpg/new | |
https://github.com/settings/tokens/new | |
>> name, repo status | |
>> copy and save pat | |
git config --global user.name "username" | |
git config --global user.email "name[at]domain[dot]tld" | |
git config --global user.email "[email protected]" | |
git config --global color.ui auto | |
git clone https://github.com/username/repo | |
>> write code :) | |
git log | |
git status | |
git diff --cached | |
git diff HEAD | |
git add . | |
>> ensure that git and gpg key email addresses are identical | |
git commit -S -m "commit title/brief" -m "commit decription" | |
>> enter gpg secret | |
git push | |
>> username, pat | |
git log --show-signature |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note, new email format from https://github.com/settings/emails:
[email protected]
- use for both key generation and code signing, and use PAT:repo for git cli uploads