git fetch --all --no-tags
并没有按照它所说的去做,并且每次运行它时都会重新获取标签。如何在不获取标签的情况下实际从所有遥控器获取数据?
重现:
- 分叉这个仓库
- 克隆你的叉子
- 添加上游遥控器
[email protected]:cachix/install-nix-action.git
git fetch --all --no-tags
应该发生什么:这笔交易不应该伤害任何标签。
实际发生的情况:遥控器破坏了彼此的标签:
❯ git fetch --all --no-tags
Fetching origin
From github.com:example-user/install-nix-action
- [deleted] (none) -> [omitted]
[…]
Fetching upstream
From github.com:cachix/install-nix-action
* [new tag] [omitted] -> [omitted]
[…]
当仅获取默认远程时,它甚至会表现出这种行为:
❯ git fetch --no-tags
From github.com:example-user/install-nix-action
- [deleted] (none) -> [omitted]