EREMOTE添加静态获取标签带有-NO-TAGS选项

问题描述 投票:0回答:2
[编辑:使用较小的存储库;添加输出]

在一个新鲜创建的存储库中,此命令仍然获取所有标签:

git remote add --fetch --no-tags upstream https://github.com/phdru/mimedecode.git
不是the选项的重点不获取标签吗?  我想念什么吗?

--no-tags

i以非苹果git2.33.0.

观察相同的行为。
	

这不是答案,我只是滥用答案框发布格式的文本。

% git --version git version 2.30.1 (Apple Git-130) % git remote add --fetch --no-tags origin https://github.com/phdru/mimedecode.git Updating origin remote: Enumerating objects: 1684, done. remote: Counting objects: 100% (72/72), done. remote: Compressing objects: 100% (48/48), done. remote: Total 1684 (delta 35), reused 54 (delta 22), pack-reused 1612 Receiving objects: 100% (1684/1684), 245.14 KiB | 3.10 MiB/s, done. Resolving deltas: 100% (1160/1160), done. From https://github.com/phdru/mimedecode * [new branch] master -> origin/master * [new tag] 2.7.0 -> 2.7.0 * [new tag] 2.8.0 -> 2.8.0 * [new tag] 2.9.0 -> 2.9.0 * [new tag] 3.0.0 -> 3.0.0 * [new tag] 3.1.0 -> 3.1.0 * [new tag] v2.3.0 -> v2.3.0 * [new tag] v2.3.1 -> v2.3.1 * [new tag] v2.3.2 -> v2.3.2 * [new tag] v2.3.3 -> v2.3.3 * [new tag] v2.3.4 -> v2.3.4 * [new tag] v2.3.5 -> v2.3.5 * [new tag] v2.3.6 -> v2.3.6 * [new tag] v2.3.7 -> v2.3.7 * [new tag] v2.3.8 -> v2.3.8 * [new tag] v2.4.0 -> v2.4.0 * [new tag] v2.5.0 -> v2.5.0 * [new tag] v2.6.0 -> v2.6.0
git git-remote
2个回答
0
投票
底线:

$ git init Initialized empty Git repository in test-git/.git/ $ git remote add --fetch --no-tags origin https://github.com/phdru/mimedecode.git Updating origin remote: Enumerating objects: 1667, done. remote: Counting objects: 100% (71/71), done. remote: Compressing objects: 100% (47/47), done. remote: Total 1667 (delta 35), reused 53 (delta 22), pack-reused 1596 Receiving objects: 100% (1667/1667), 239.77 KiB | 288.00 KiB/s, done. Resolving deltas: 100% (1160/1160), done. From https://github.com/phdru/mimedecode * [new branch] master -> origin/master $ rm -rf .git $ git init Initialized empty Git repository in test-git/.git/ $ git remote add --fetch origin https://github.com/phdru/mimedecode.git Updating origin remote: Enumerating objects: 1684, done. remote: Counting objects: 100% (88/88), done. remote: Compressing objects: 100% (64/64), done. remote: Total 1684 (delta 35), reused 70 (delta 22), pack-reused 1596 Receiving objects: 100% (1684/1684), 245.14 KiB | 445.00 KiB/s, done. Resolving deltas: 100% (1160/1160), done. From https://github.com/phdru/mimedecode * [new branch] master -> origin/master * [new tag] 2.7.0 -> 2.7.0 * [new tag] 2.8.0 -> 2.8.0 * [new tag] 2.9.0 -> 2.9.0 * [new tag] 3.0.0 -> 3.0.0 * [new tag] 3.1.0 -> 3.1.0 * [new tag] v2.3.0 -> v2.3.0 * [new tag] v2.3.1 -> v2.3.1 * [new tag] v2.3.2 -> v2.3.2 * [new tag] v2.3.3 -> v2.3.3 * [new tag] v2.3.4 -> v2.3.4 * [new tag] v2.3.5 -> v2.3.5 * [new tag] v2.3.6 -> v2.3.6 * [new tag] v2.3.7 -> v2.3.7 * [new tag] v2.3.8 -> v2.3.8 * [new tag] v2.4.0 -> v2.4.0 * [new tag] v2.5.0 -> v2.5.0 * [new tag] v2.6.0 -> v2.6.0

为我设计的工作。
P。我用我的小存储库来使测试更快。
    

这可能不是您遇到的确切情况,但是我观察到(至少在GIT 2.48.1上),如果您还将the trual设置为true to y true the您的遥控器,则在fetch命令和config as grouth中都忽略了
git remote add --fetch --no-tags

选项。如果您有该选项,请确保将其删除,然后

--no-tags

应按预期工作。

0
投票

最新问题
© www.soinside.com 2019 - 2025. All rights reserved.