gpt4 book ai didi

git - 如何查看特定 git 提交时的文件?

转载 作者:太空狗 更新时间:2023-10-29 13:19:44 25 4
gpt4 key购买 nike

给定一个文件 foo.m,我怎样才能让 Git 向我显示 foo.m 的完整内容,就像它们在某个提交 x 中一样?

最佳答案

git checkout sha1_here  -- foo.m

或者不 checkout 文件而只是从命令行查看它

git show sha1_here:path_to_file/foo.m

关于git - 如何查看特定 git 提交时的文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2294048/

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