Skip to content

Large files in git #681

@MartinThoma

Description

@MartinThoma

I've noticed some astonishingly large files in this repository (in the git history):

81ebba90f411  1,4MiB buildJvm/build_53_King_kotlin/build/install/build_53_King_kotlin/lib/kotlin-stdlib-1.6.0.jar -- added via fe4219dc5a847f919d35b965789026ffdc3b40b3
eeb85bc8ea11  4,4MiB 53_King/kotlin/king.jar -- added via fe4219dc5a847f919d35b965789026ffdc3b40b3
7c624e47ff0f   25MiB 89_Tic-Tac-Toe/python/TicTacToe_exe/TicTacToe.exe -- added via 3efe6e3ae260800beae7c28ed095960939344581
65c61eb509d6   34MiB 39 Golf/csharp/compiled/linux_x86/golf -- added via 0dbb491ff9b2b22744cb7b5ddf6e6241938b70f0
5222483d2f8c   66MiB 39 Golf/csharp/compiled/windows_x86/golf.exe -- added via 0dbb491ff9b2b22744cb7b5ddf6e6241938b70f0

They are all already deleted, but still in the git history. This makes this repository way bigger than necessary. I've just seen a warning by Github about which I was confused ... and especially about the executable in 89_Tic-Tac-Toe/python. I initially thought I had done something wrong.

Re-write history

We could remove those from the git history: https://stackoverflow.com/a/2158271/562769
However, I have to admit that re-writing git history always feels scary to me

Prevent it in future

I would like to do two things:

  1. Add the pre-commit hook check-added-large-files
  2. Check in the CI if a large file was added (the simplest way to do it would be to run pre-commit in CI, but I would like to avoid that ... I need to check how to do this)

Does this sound like a good idea to you?

What would be a good maximum file size?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions