所以 git fetch 命令的 -p 参数有啥用?
git吧
全部回复
仅看楼主
level 1
沉冰浮水 楼主
如题- -
2022年10月30日 12点10分 1
level 1
沉冰浮水 楼主
-p
--prune
Before fetching, remove any remote-tracking references that no longer exist on the remote. Tags are not subject to pruning if they are fetched only because of the default tag auto-following or due to a --tags option. However, if tags are fetched due to an explicit refspec (either on the command line or in the remote configuration, for example if the remote was cloned with the --mirror option), then they are also subject to pruning. Supplying --prune-tags is a shorthand for providing the tag refspec.
See the PRUNING section below for more details.
2022年10月30日 12点10分 2
level 12
Git 本地仓库一般会有一个类似于 refs/remote/origin/main 这样的隐形分支来跟踪远程对应分支的状态,并与本地分支建立关联关系。-p 等同于 --prune ,用来清理远程已经不存在的本地追踪分支(Prune remote-tracking branches no longer on remote)。
2022年11月07日 03点11分 3
感谢,,大概懂了。。
2022年11月08日 04点11分
1