" --no-edit 如何修改第一条注释信息 git commit --amend 子模块 递归更新子模块: git submodule..." />

Github Usage

 · 1 min read
 · Grape
Last updated: November 21, 2024

如何修改第一条的作者信息

git commit --amend --author="developer <[email protected]>" --no-edit

如何修改第一条注释信息

git commit --amend

子模块

递归更新子模块:

git submodule add <remote url> <local url>
git submodule add https://github.com/tatamobile/pelican-boostrap5.git themes/pelican-bootstrap5

git submodule update --init
git submodule update --init --recursive
git archive -o v0.0.1.zip main
eval `ssh-agent -s`
GitHub
ssh-keygen -t ed25519 -C "[email protected]"

创建ssh-key 并且重命名

cd ~/.ssh
ssh-keygen -t rsa -C "[email protected]"
ssh-keygen -t ed25519 -C "[email protected]"

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>

用zip加密压缩文件和目录

zip -e -r keys.zip keys