Git总是捆绑带注释的标签

时间:2016-02-27 04:45:16

标签: git backup

我在使用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

1 个答案:

答案 0 :(得分:0)

commit c9a42c4(git 1。6。2,2009年1月)以来不应该是这种情况,尽管该提交在commit 2c8544a (git 2.1.1, Aug 2014)中修复了错误。

所以第一个测试和update git,看看问题是否仍然存在。