How to recover commit from 'detached head state'?

前端 未结 2 1547
我在风中等你
我在风中等你 2021-02-18 14:45

I checked out another branch with updates then made a few changes, switched back to the main git and now the changes disappeared! Can I get them back? the terminal was basically

2条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-18 15:51

    Assuming you're still on master:

    git merge 7c09e17
    

    should be enough. git is usually good about telling you the commit IDs, if you watch the terminal.

提交回复
热议问题