Git undo local branch delete

后端 未结 8 1812
慢半拍i
慢半拍i 2020-11-29 14:52

I just deleted the wrong branch with some experimental changes I need with git branch -D branchName.

How do I recover the branch?

8条回答
  •  孤街浪徒
    2020-11-29 15:18

    Thanks, this worked.

    git branch new_branch_name sha1

    git checkout new_branch_name

    //can see my old checked in files in my old branch

提交回复
热议问题