Git 始终捆绑带注释的标签
Git always bundles annotated tags
我在使用 git-bundle 创建备份时遇到问题。
我正在尝试通过运行以下命令列表创建备份:
$git bundle create <path_to_bundle> --all
$last_commit=($(git rev-list --all --timestamp | awk '{print +1,;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
不应该是这种情况,因为 commit c9a42c4 (git 1.6.2, Jan. 2009), although that commit has a bug fixed in commit 2c8544a (git 2.1.1, Aug 2014)。
所以第一次测试 update git 看看问题是否仍然存在。
我在使用 git-bundle 创建备份时遇到问题。
我正在尝试通过运行以下命令列表创建备份:
$git bundle create <path_to_bundle> --all
$last_commit=($(git rev-list --all --timestamp | awk '{print +1,;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
不应该是这种情况,因为 commit c9a42c4 (git 1.6.2, Jan. 2009), although that commit has a bug fixed in commit 2c8544a (git 2.1.1, Aug 2014)。
所以第一次测试 update git 看看问题是否仍然存在。