Caution:
This post was published in 2015 and may contain information, techniques or code examples that are no longer current. Please double-check official documentation and modern best practices before using anything from this article.
This post was published in 2015 and may contain information, techniques or code examples that are no longer current. Please double-check official documentation and modern best practices before using anything from this article.
Some useful copy-and-paste lines for the .gitattributes file when using Beanstalk Git.
Image and other binary files
Upload and store images as binary files, rather than text – the default. This will stop images being corrupted upon commit/push.
*.png binary *.gif binary *.jpg binary *.jpeg binary
Dealing with line endings
Handle line endings automatically for files detected as text and leave all files detected as binary untouched.
* text eol=lf
The above will handle all files NOT found below it. The lines below should be added as the files are text and should be normalized (Convert crlf => lf)
*.gitattributes text eol=lf
.gitignore text eol=lf