With github.com/martinvonz/jj (Jujutsu), there is a common failure mode:
You checkout too far back into the history where the .gitignore
does not catch anymore your large files and you become stuck forever with:
$ jj show
Error: Failed to snapshot the working copy: New file very/big/file of size ~922.4MiB exceeds snapshot.max-new-file-size (1.0MiB)
If it's just one big file, no biggie:
$ echo very/big/file >> .gitignore
It's much harder if you placed a lot of different big files around your repo. How to rollback the situation and go back to a known my_good_branch
containing a proper .gitignore
:
$ jj checkout my_good_branch --ignore-working-copy
$ git checkout .gitignore
Updated 1 path from the index
$ jj workspace update-stale
Done importing changes from the underlying Git repo.
Concurrent modification detected, resolving automatically.
Done.
$ jj version
jj 0.13.0-5450e6c9bae40b941b05942bdd78a88e1b9093a6