Closed1

gitの参照されなくなったキャッシュを手動で削除する

bilzardbilzard
# 不要なオブジェクトやリファレンスを削除:
git gc --prune=now

# すべてのリモートブランチのリファレンスを更新:
git fetch --prune

# リファレンスのログを掃除:
git reflog expire --expire=now --all
git gc --prune=now

# 最適化とクリーンアップ:
git repack -ad  # パックファイルを最適化して再パック
git prune       # 参照されていないオブジェクトを削除
このスクラップは2024/01/20にクローズされました