【发布时间】:2016-02-27 04:45:15
【问题描述】:
我在使用 git-bundle 创建备份时遇到问题。
我正在尝试通过运行以下命令列表来创建备份:
$git bundle create <path_to_bundle> --all
$last_commit=($(git rev-list --all --timestamp | awk '{print $1+1,$2;exit}'))
$sha_tag=${last_commit[1]}
$timestamp=${last_commit[0]}
$git tag -f lastBundle $sha_tag
然后我想验证当我在同一个 repo 上再次运行这个脚本时,我不会生成一个包。我运行以下命令:
$git bundle create <path_to_bundle> --since=lastBundle --all
问题是这会创建一个包含我所有注释标签的包。正如我所怀疑的那样,不包括所有其他标签和分支。当我运行这个命令时:
$git rev-list --since=lastBundle--all
我没有看到任何提交,但不知何故,捆绑例程仍在拾取我的注释标签。我错过了什么?最新的提交是在一个分支上,而不是在 master 上。
我在跑步:
$git version
git version 1.8.5.2
【问题讨论】: