Closed medewitt closed 3 years ago
This is mostly own for my education, but if I understand correctly, the .gitattributes
file would ignore, initially, whatever files first came with it when the Git repo was first initiated. Is that about right? I could see that as a useful addition but I also want to make sure I understand what it's doing myself.
Right, so git will ignore those extensions/files in the .gitignore
and for those that are to be tracked the .gitattributes
tells git how to track them.
If you tell git that a file is a binary, it won't try to do a line by line version/diff on it and you get caught in git hell (where you have conflicting binaries). There are loads of special options that one can use to specify how to diff on different file extensions (e.g. with word you can diff the text using docx2txt).
Something to think about adding. within the project so that newbies don't accidently commit something they shouldn't or start tracking changes on a binary file that will blow their .git up.
.gitattributes