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

Hello, I'm Keith, a website developer in Belfast, Northern Ireland working with PHP, Magento, Shopify, WordPress along with everything that involves getting websites online

keithgreer.uk · Blog Posts
 page.title

Warning: Your browser is very out-of-date. You should upgrade to a better browser.