我犯了个错误:
error: Your local changes to the following files would be overwritten by merge:
public/js/file.js
public/file.json
Please commit your changes or stash them before you merge.我保存了所有修改文件的列表
git status和命令运行
git stash我合并了所有的文件,现在我需要恢复我的所有更改。所有文件的列表都很大,包括删除/新文件,例如:
On branch main
Your branch is up to date with 'origin/main'.
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
deleted: app/Http/Controllers/ItemController.php
new file: app/Http/Controllers/BoxController.php
Changes not staged for commit:
(use "git add/rm <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: .gitignore
modified: app/Http/Controllers/ItemController.php
Untracked files:
(use "git add <file>..." to include in what will be committed)
app/Http/Controllers/ItemController.php
app/Http/Requests/ItemRequest.php当我需要还原一些修改过的文件时,我可以手动应用更改,但是
发布于 2021-07-15 22:03:31
要还原您的更改,请执行git stash apply。但是,您的合并似乎是不完整的。在尝试应用您的存储之前,您需要对合并进行git commit。
https://stackoverflow.com/questions/68396930
复制相似问题