Git 常用命令
拉取最新的 tags
git fetch --tags
checkout 最新的 tag
latest_tag=$(git describe --tags `git rev-list --tags --max-count=1`) && git checkout tags/${latest_tag} -b ${latest_tag}
来回切换上一次的分支
git switch -
或git checkout -
, 类似Linux 命令的 cd -
用法切换指定的 commit
git checkout commit_id
上传大文件 (安装 git lfs) brew install git-lfs git lfs track [file]
参考
https://devconnected.com/how-to-checkout-git-tags/
https://www.techiedelight.com/clone-specific-tag-with-git/ https://blog.csdn.net/gtLBTNq9mr3/article/details/110729551