[英]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.