Skip to main content

Git

Common Usage

Your Profile

[ -f ~/.gitconfig ] && rm -i ~/.gitconfig || :
git config --global --edit

Write your name and email under the [user]

Optimize

# use main as default branch name
git config --global init.defaultBranch main

# auto stash
git config --global rebase.autostash true
git config --global merge.autostash true

What is auto stash?

Set SSH Passphrase

ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519
echo
cat ~/.ssh/id_ed25519.pub

copy public key, then upload:

Modify Passphrase
ssh-keygen -p

Login Confirm

GitHub

Official Verification

RSA
SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8

ECDSA
SHA256:p2QAMXNIC1TJYWeIOttrVc98/R1BUFWu3/LiyKgUfQM

Ed25519
SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU
Gitee
Ed25519
SHA256:+ULzij2u99B9eWYFTw1Q4ErYG/aepHLbu96PAUCoV88

Received GitHub notifications from Browsers. ( firefox )

赞助作者 (Sponse me):