Git 常用命令
tag
打标签 & 推送远端
git tag {version}
git push origin {version}批量删除本地tag & 远端tag
git tag -l "v1*" | xargs -n 1 git push --delete origin
git tag -l "v1*" | xargs git tag -d查看某行代码的提交记录
git blame 文件路径查看指定某一行
git blame -L 15,15 src/App.tsx查看某个范围
比如第 15 到 20 行:
git blame -L 15,20 src/App.tsx查看 commit 的详细记录
git show a1b2c3d4查看这一行的历史变更过程(强烈推荐
git log -L 15,15:src/App.tsxLast updated on