跳至正文

笔记

29 字
1 分钟
快速 Git fixup
2024-11-24

需要存在 fzf。

Fixing commits with git commit --fixup and git rebase --autosquash | Jordan Elver | Ruby on Rails Developer, Bristol, UK

  1. Add autosquash to ~/.gitconfig

    [rebase]
    autosquash = true
  2. Add alias to ~/.gitconfig

    [alias]
    fixup = "!git log -n 50 --pretty=format:'%h %s' --no-merges | fzf | cut -c -7 | xargs -o git commit --fixup"
9 字
1 分钟
批量下载 Github Release
2024-11-23

安装 Github 官方 CLi 并登录。

Terminal window
gh release list -R mihomo-party-org/mihomo-party | `
Select-String -Pattern 'v\d+\.\d+(\.\d+)?' | %{$_.Matches.Value} | `
ForEach-Object { `
Write-Host "Downloading version $_..." ; `
gh release download $_ -D D:/tmp/Download/pt/$_ -R mihomo-party-org/mihomo-party `
}