gpt4 book ai didi

git - 检索 Git 推送历史?

转载 作者:行者123 更新时间:2023-12-05 04:05:04 26 4
gpt4 key购买 nike

Git 会在任何地方记录推送到远程的历史吗?

我注意到我们能够在 Microsoft VSTS 中查看 Git 存储库的推送历史记录以及每次推送的相关提交。它甚至显示旧的、过时的提交,由于后来的强制推送重写了提交历史,这些提交不应再存在。这个附加信息是 VSTS 专门提供的,而不是内置在 Git 中的吗?

最佳答案

不确定我是否完全理解你的意思,如果你在下面的截图中谈论远程端推送历史。

enter image description here

对于本地 repo ,你可以看看这个线程:

Actually, when you execute git reflog expire --expire=now --all and git gc --prune=now, the danglind commits were removed. You can double check by git fsck --full. If the output doesn’t show commits, that means there has no dangling commits.

但是您无法对远程 git 仓库执行任何 git 命令,这应该是由 this 引起的正如丹尼尔在上面也提到的:

We rolled out commit reachability bitmap indexes to VSTS and removed the clone cheat mentioned below. Cloning will no longer download unreachable objects!. We still don't have true object-level git gc on the server yet, but clone sizes will be smaller now.

TFS on-prem will get these changes in v.Next (not in any TFS 2017 updates, but the next major release).

关于git - 检索 Git 推送历史?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51756483/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com