Skip to content

Instantly share code, notes, and snippets.

@gnthibault
Created March 16, 2022 14:30
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
# from https://stackoverflow.com/questions/16244969/how-to-tell-git-to-ignore-individual-lines-i-e-gitignore-for-specific-lines-of
# Run the following command:
git config --global filter.gitignore.clean "sed '/#gitignore$/d'"
# Now, either add a local file in .git/info/attributes
echo "*.extension_to_be_ignored filter=gitignore" > ./.git/info/attributes
# or write into a file that will be part of your code
echo "path_to_file_with_the_ignore_directive filter=gitignore" > ./.gitattributes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment