Sometimes you may want to override git's decision of wheter a file contains text or binary data. For example, you may have to pull in some external library and want git to track it but not diff it inside. For this, git lets you define what to do with specific files or entire directories.
Simply add a `.gitattributes` file in the root of the project, or in the parent directory of the one you want to affect, and use the following syntax:
# For files
file.txt binary
# For entire directories
folder/* binary
Leave a Reply