繁体   English   中英

git pull --rebase --autostash 在冲突中丢失文件

[英]git pull --rebase --autostash losing files on conflict

我试过了:

>git pull --rebase --autostash

这导致:

Created autostash: 019054d
error: Your local changes to the following files would be overwritten by checkout:
        FILENAME
Please commit your changes or stash them before you switch branches.
Aborting
fatal: Could not detach HEAD
First, rewinding head to replay your work on top of it...

然后我用 FILENAME 处理了这个问题,此时我想在尝试拉取或继续之前恢复到状态,但是:

C:\Projekte\FLOS>git pull --rebase --autostash
fatal: It seems that there is already a rebase-apply directory, and
I wonder if you are in the middle of another rebase.  If that is the
case, please try
        git rebase (--continue | --abort | --skip)
If that is not the case, please
        rm -fr ".git/rebase-apply"
and run me again.  I am stopping in case you still have something
valuable there.
>git rebase --abort
error: could not read '.git/rebase-apply/head-name': No such file or directory

(确实该文件不存在,但该文件夹中存在一个autostash存储文件)

git stash list命令不显示创建的存储。

如何恢复应该隐藏的所有更改?

好的,我已经解决了。 但这不可能是预期的工作流程。

正如中所建议的: 如何在中止的变基后应用自动存储?

git stash apply 019054d (使用自动存储的哈希)->即使我看不到git stash list的存储,它也能工作

然后我rm -fr ".git/rebase-apply"退出 rebase 进程。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM