【发布时间】:2020-09-25 23:33:41
【问题描述】:
我在本地项目中错误地拉取 Github 上的项目,因此本地项目中的所有项目都被删除并由 github 项目替换。
注意: Github 上的项目是 Flutter 项目,本地项目是 Laravel one。
如何找到我的 Laravel 项目?
这一些代码可能有助于解决这个问题
$ git status .
On branch master
Untracked files:
(use "git add <file>..." to include in what will be committed)
test.sh
nothing added to commit but untracked files present (use "git add" to track)
【问题讨论】:
-
Pull 不会删除任何内容(至少您无法恢复)。您能给我们提供更多背景信息吗?
-
git pull相当于运行fetch,然后运行merge。你所有的提交仍然存在(你最近的状态很可能在HEAD^)。如果您没有本地更改,则可以进行硬重置。如果您有本地更改,请在重置之前存储。