I am working on a project where webpack's bundle.js is part of the repository. This file is gigantic and has many diffs and slows magit down. Is there a way I can tell magit to ignore this file when computing unstaged changes? To reiterate, I don't want to untrack the file or add it to my .gitignore, I just want magit to ignore it.


You can tell git to temporarily ignore changes to a certain file using:

git update-index --assume-unchanged <file>

and later you can undo that using:

git update-index --no-assume-unchanged <file>

Magit will respect that setting too.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.