gpt4 book ai didi

git - 将文件恢复到以前的版本后,git diff 显示没有差异?

转载 作者:太空狗 更新时间:2023-10-29 14:05:32 25 4
gpt4 key购买 nike

reverting a file to a previous revision 之后在 git 中

git checkout abcdefg myfile

git diff myfile <-- 没有显示结果。

最佳答案

还原将更改 pull 到登台,因此您必须使用

git diff --cached myfile

关于git - 将文件恢复到以前的版本后,git diff 显示没有差异?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34051174/

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