https://stackoverflow.com/a/11657647/3672812
在 feature 分支下
git rev-list --count HEAD ^master 13
https://stackoverflow.com/a/11657647/3672812
在 feature 分支下
git rev-list --count HEAD ^master 13
一个 commit 不小心打了多个 tag
输出最新的 tag
LATEST_TAG=$(git describe --tags $(git rev-list --tags --max-count=1))
根据最新的 commit 显示多个 tag
git show-ref --tags | grep $(git rev-parse v0.2.0) a359509551c1a85cdfbf7675d3f7f36a8577ee38 refs/tags/v0.2.0 a359509551c1a85cdfbf7675d3f7f36a8577ee38 refs/tags/v0.3.0
方法一:
git --no-pager log -n 1 --name-only ${COMMIT_SHA}
方法二:
git --no-pager show --stat=1000,800 ${COMMIT_SHA}
gpg --list-secret-keys gpg --list-keys
导出 secret key
gpg --export-secret-keys YOUR_ID_HERE > private.key
导入 secret key
gpg --import private.key
查看加密文件
git-crypt status
解密整个 repo
git-crypt unlock
windows 自带的 terminal 太难用了,用 git bash
https://stackoverflow.com/questions/20573213/embed-git-bash-in-pycharm-as-external-tool-and-work-with-it-in-pycharm-window-w
git bash upgrade
$ git version
git version 2.24.0.windows.2
$ git update-git-for-windows
Or download from official site
https://git-scm.com/downloads
alias clean_merged='git checkout master && git branch --merged | grep -v master | xargs git branch -D'