![](/img/trans.png)
[英]How to recover locally deleted files that has not been committed after changes
[英]How to recover locally committed changes(but not pushed to remote) after deleting branch from locally?
我在本地提交但未推送到遠程的分支中幾乎沒有做任何更改..但是我錯誤地從本地刪除了該分支然后再次從遠程獲取該分支。
在這種情況下,我如何才能獲得我在本地提交的更改?
謝謝你的幫助
做一個git reflog --no-abbrev
。
標識已刪除分支的最后一次提交。
執行git checkout -b <your-branch-name> <commit-hash>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.