git: reflog の特定HEADを削除

余程のことがない限りやらないけどメモ

ログのリスト表示

git reflog

削除

git reflog delete HEAD@{<対象の番号>}

すべてのリファレンスログを即座に期限切れにして削除

git reflog expire --expire=now --all

到達不能なオブジェクトを即座に削除

git gc --prune=now --aggressive

Force push

git push --force-with-lease origin <branch_name>