Git recover uncommitted changes

后端 未结 6 769
萌比男神i
萌比男神i 2020-12-06 11:52

I had a lot of local changes.

I just accidentally did

git merge another_branch
git reset --hard HEAD^

on a lot of work. :( with the

6条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-06 12:04

    If the changes had never been committed/stashed/staged, then you're out of luck. If they have, then you should be able to git your changes back by looking for them in git reflog.

提交回复
热议问题