git删除了本地文件夹,如何从服务器下载下来?

wangpeng_118 2019-09-05 02:55:10
误删了本地代码中的一个目录,如何从服务器下载下来?谢谢
...全文
1545 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
wangpeng_118 2019-09-05
  • 打赏
  • 举报
回复
git pull更新不了
git checkou /dirname 更新不了
--------------------------------------------------
用这个方法可以:
1.git status // 查看本地对改动的暂存记录
2.git reset HEAD [ 被删除的文件或文件夹 ]
3.git checkout [ 被删除的文件或文件夹 ]
这个是ok的。

但是我这里开始执行有报错:
If no other git process is currently running, this probably means a git process crashed in this repository earlier. Make sure no other git process is running and remove the file manually to continue.
不知道啥时候这个上锁了。
把index.lock 文件删掉,上面三步就可以了
科学种田 2019-09-05
  • 打赏
  • 举报
回复
git pull 更新一下本地库??

3,881

社区成员

发帖
与我相关
我的任务
社区描述
C/C++ 其它技术问题
社区管理员
  • 其它技术问题社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧