便签

记录一些常用的命令片段。

Git

git 更新 submodule

初始化 submodule

$
git submodule update --init --recursive

更新 submodule

$
git submodule update --recursive --remote
git cherry-pick 其他同源项目

将目标代码库加为远程仓库

$
git remote add target <RepoURL>

将远程代码拿到本地

$
git fetch target

转移提交

$
git cherry-pick <commitHash>
git 设置 GPG$
git config --global user.signingkey EA5F9C5A0744631B

$

{code="git config --global gpg.program "C:\Program Files (x86)\GnuPG\bin\gpg.exe""}

$
git config --global commit.gpgsign true
git 撤销 commit$
git reset --soft HEAD^