|
|
# Binary Files in a Git Project
|
|
|
|
|
|
It is suggested that you try not to have binary files (.exe, .zip, .doc, .docx, etc.) in your projects.
|
|
|
When you use binary files, every time you do a commit that includes the binary file, it takes up the entire room of the binary file. If it is possible to have a binary file in a format that is usable by diff, please do that.
|
|
|
|
|
|
## Microsoft Word 2010+ .DOCX files
|
|
|
If you wish to have docx files in your project, please see http://blog.martinfenner.org/2014/08/25/using-microsoft-word-with-git/ (students will most likely not be able to get here through the proxy)
|
|
|
This converts the .docx file (using pandoc) into a markdown file, which is easily used with diff.
|
|
|
The following is what you have to do from the blog post.
|
|
|
|
|
|
Make a file called .gitattributes in your main folder of your git project:
|
|
|
```
|
|
|
*.docx diff=pandoc
|
|
|
```
|
|
|
Then, make a file called .gitconfig in the main folder of your git project:
|
|
|
```ini
|
|
|
[diff "pandoc"]
|
|
|
textconv=pandoc --to=markdown
|
|
|
prompt = false
|
|
|
[alias]
|
|
|
wdiff = diff --word-diff=color --unified=1
|
|
|
```
|
|
|
|
|
|
## Compiled Programs
|
|
|
Please put an entry in .gitignore for any compiled output of your programs. |
|
|
\ No newline at end of file |