根据 documentation , git update-index --refresh
这样做:
Looks at the current index and checks to see if merges or updates are needed by checking stat() information.
git“检查是否需要 merge 或更新”是什么意思?git 是否在某处保留一个任意标志,在某些操作后说“mergeme”?
此外,我想我了解 stat
( what is "stat information" in a git index? ),但我不明白如何了解 the UID 这样的事情帮助 git 知道是否需要进行 merge 。
最佳答案
描述有点误导。此命令检查工作副本是否与索引不同。在此上下文中, merge 意味着您需要使用 git add
、git rm
或 git checkout
来带来索引和工作同步复制。这与 git merge
无关。
索引存储工作副本文件的快照 stat
信息,以优化对用户修改的检测。每次将这些修改插入暂存区(git add
、git rm
)或丢弃工作副本修改(git checkout
)时,它都会更新code>, git reset
, ...).
关于git - git如何检查是否需要 merge ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5327559/