Github Usage

创建ssh-key 并且重命名

cd ~/.ssh
ssh-keygen -t rsa -C "example@example.com"
ssh-keygen -t ed25519 -C "your_email@example.com"

on Windows:

eval `ssh-agent -s`

将ssh-key添加到ssh agent

ssh-add example

配置,将不同账号与ssh-key关联

vim config
Host example
    Hostname github.com
    PreferredAuthentications publickey
    IdentityFile ~/.ssh/example

在git服务器上添加公钥

cat example.pub

测试

ssh -T example

Common Usage

zip branch

git archive -o v0.0.1.zip main

Create empty branch

git switch --orphan <new branch>
git commit --allow-empty -m "Initial commit on orphan branch"
git push -u origin <new branch>

links

social