question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Large files in git

See original GitHub issue

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?

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:3
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
coding-horrorcommented, Mar 28, 2022

OK! I cloned the repo from scratch and it looks good to me! Thank you!

2reactions
MartinThomacommented, Mar 28, 2022

The history re-write is done. Please clone from the current repository

Read more comments on GitHub >

github_iconTop Results From Across the Web

About large files on GitHub
GitHub limits the size of files allowed in repositories. If you attempt to add or update a file that is larger than 50...
Read more >
Git Large File Storage | Git Large File Storage (LFS) replaces ...
Git Large File Storage (LFS) replaces large files such as audio samples, videos, datasets, and graphics with text pointers inside Git, while storing...
Read more >
Git with large files
The primary reason git can't handle huge files is that it runs them through xdelta , which generally means it tries to load...
Read more >
Efficiently manage large files in Git with Git LFS
Git Large File Storage (LFS) replaces large files such as audio samples, videos, datasets, and graphics with text pointers inside Git while ...
Read more >
Git Large File Storage (LFS)
Managing large files such as audio, video and graphics files has always been one of the shortcomings of Git. The general recommendation is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found