Created
March 16, 2022 14:30
-
-
Save gnthibault/fdc23d9f067e176bee6971892ff5f4c6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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