gpt4 book ai didi

git - 无法在 Git 中恢复文件

转载 作者:太空狗 更新时间:2023-10-29 12:50:30 24 4
gpt4 key购买 nike

<分区>

Possible Duplicate:
Restore a deleted file in a Git repo

我的 Git 中有两个分支,master 和 newFeature。在 newFeature 分支,我先在终端中物理删除了文件 A,然后在 Git 中通过

git rm fileA

随后,我跑

git add .
git commit

现在,我再次需要fileA。我想到我可以通过简单地切换到分支 master 来取回它。我显然错了,因为我找不到 fileA

如何使用 Git 取回文件 A?

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