1.使用git log -g 找回之前提交的commit
commit 029973d5ff2172adf1aeacc37efa876f2c84e4d8
Reflog: HEAD@{1} (写意 <413118324@qq.com>)
Reflog message: checkout: moving from dev_1008526 to release
Merge: 08c967b 4b8e439
Author: 写意 <413118324@qq.com>
Date: Sat Jun 19 14:57:02 2021 +0800
Merge branch 'dev_1008526' into release
2.使用git branch recover_branch[新分支] commit_id命令用这个commit创建一个分支
git branch test 029973d5ff2172adf1aeacc37efa876f2c84e4d8
3.切换到test分支,检查文件是否存在
git checkout test
切换成功,分支创建成功