Context: working on a fork of a libraray that generates lots aof code for testing and also uses a subrepo.
I only want to commit my changes. Also I would like to use VS Code's git support for that.
I also do not want to modify the .gitignore
file.
Steps to ignore these changes locally:
Add the directories to local exlude:
vi .git/info/exclude
# IDE files
.vscode/
# Directory with lots of generated code - will commit this before I submit a PR
browsers-test/
# git submodule - the builds also modifies files under this directory
libsodium
To ignore changes already made bu the build process, run:
git update-index --assume-unchanged libsodium
git update-index --assume-unchanged browsers-test/*
I also added these directories to exlude list of VS Code.
Sources:
https://stackoverflow.com/a/28620604