commit全削除
例えばローカルで作業
–orphanで親のない孤児(orphan)のtmpと言う名のブランチを作る
コミットする
checkout -Bは branch -f してcheckout
tmpブランチは削除
git checkout --orphan tmp
git commit -m 'First commit'
git checkout -B main
git branch -d tmp
強制push
githubにpush
git push -f orign main
強制pull
他のマシンとかサーバーで
git checkout main
git fetch origin main
git reset --hard origin/main