`git reflog`でブランチを削除する直前の履歴番号を調べ、`git branch`コマンドで同じ名前で作り直す。 ```shell $ git log --oneline 2a97391 (HEAD -> target) Add hoge 1526e21 (master) First commit $ git switch master Switched to branch 'master' $ git branch -D target Deleted branch target (was 2a97391). $ git log --oneline --all 1526e21 (HEAD -> master) First commit $ git reflog 1526e21 (HEAD -> master) HEAD@{0}: checkout: moving from target to master 2a97391 HEAD@{1}: commit: Add hoge 1526e21 (HEAD -> master) HEAD@{2}: checkout: moving from master to target 1526e21 (HEAD -> master) HEAD@{3}: commit (initial): First commit $ git branch target "HEAD@{1}" $ git log --oneline --all 2a97391 (target) Add hoge 1526e21 (HEAD -> master) First commit ``` もちろん`git checkout -b target "HEAD@{1}"`でもOK。