想获取最新的tag,但是发现gitlab中tag排序和命令行中获取的结果不一样,这是为什么呢:
在gitlab创建几个测试的tag:
在命令行中获取tag:
[root@xxx2 dev_client-protocol]# git fetch
remote: Enumerating objects: 31, done.
remote: Counting objects: 100% (31/31), done.
remote: Compressing objects: 100% (28/28), done.
remote: Total 31 (delta 18), reused 7 (delta 3), pack-reused 0
Unpacking objects: 100% (31/31), done.
From client-protocol
..61a15b8 dev -> origin/dev
..267a1b1 dev-更新json -> origin/dev-更新json
- [new tag] dev_1.0.1.1 -> dev_1.0.1.1
- [new tag] dev_1.0.2.1 -> dev_1.0.2.1
- [new tag] dev_1.1.0.1 -> dev_1.1.0.1
- [new tag] dev_1.2.0.1 -> dev_1.2.0.1
- ...
在命令行中查看:
[root@xxx2 dev_client-protocol]# git tag -l "dev*" --sort=taggerdate
dev_0.0.0.10
dev_0.0.0.5
dev_0.0.0.8
dev_0.0.0.9
dev_1.0.1.1
dev_1.0.2.1
dev_1.0.3.1
dev_1.0.4.1
dev_1.0.5.1
dev_1.0.6.1
dev_1.1.0.1
dev_1.2.0.1
dev_0.0.0.1
dev_0.0.0.2
命令行中获取的顺序是不对的,明显和创建tag时间不符,这是为什么呀
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…