什么是“陈旧” git分支? [英] What is a "stale" git branch?
问题描述
stale的最旧引用可在 commit e194cd1 (2007年1月,Git 1.5.0),它检测到 / strong>:跟踪远程系统删除的分支。
因此 git remote prune
。
这是stale分支的主要定义:远程跟踪不跟踪任何东西的分支(因为远程回购的实际分支已经消失)
$ b $ p $ git远程显示可以列出它们。
顺便提一下,Git系统中有两个其他的stale定义:
-
对stale的另一个引用涉及
git reflog --stale-fix
在 commit 1389d9d (Git 1.5.0),用于跟踪破坏的提交:提交不是可以从任何ref获得,并且从其可到达的提交,树或Blob对象中有一个缺失的对象,这些对象无法从任何
引用中获得。
这有助于修复运行非reflog感知的git prune
从旧的git中存在reflogs。
Commit 740fdd2 (2008年3月,Git 1.5.5)也为符号引用引入了过时,当它们指向的引用不再存在时。
A "Stale" git branch is a term I've heard a lot. I know it has something to do with branches which are regarded as less useful or useless, but cannot find an exact definition. What is a "stale" git branch?
The oldest reference to "stale" is found in commit e194cd1 (Jan. 2007, Git 1.5.0), which detected "stale tracking branches in remote": when tracking a branch which was removed by the remote system.
Hence git remote prune
.
That is the main definition for stale branch: a remote tracking branch which doesn't track anything (because the actual branch on the remote repo is gone)
git remote show
is able to list those.
Incidentally, you have two other definitions of "stale" in the Git system:
Another reference to "stale" involves
git reflog --stale-fix
in commit 1389d9d (Git 1.5.0), for tracking "broken commit": a commit that is not reachable from any of the refs and there is a missing object among the commit, tree, or blob objects reachable from it that is not reachable from any of the refs.
That helps fixing situation after running non reflog-awaregit prune
from an older git in the presence of reflogs.Commit 740fdd2 (March 2008, Git 1.5.5) also introduces "stale" for symbolic refs, when the ref they point to no longer exists.
这篇关于什么是“陈旧” git分支?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!