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
Latest posts
—
Choosing the right content management system
Choosing the right content management system (CMS) is one of the most consequential early decisions when building a website The content management system shapes everything from how editors publish to…
Continue reading "Choosing the right content management system"
—
General-purpose AI assistants
Four AI assistants compared by power, privacy, integration and real-time awareness. ChatGPT, Gemini, Lumo and Grok are all general-purpose AI assistants, but they are built around markedly different priorities: overall…
—
Website speed improvements
Website speed has become one of the most significant factors in determining user satisfaction and search performance. A slow-loading website can frustrate visitors, damage your brand’s credibility and, ultimately, cost…
—
Structured data for SEO
Adding structured data to a website is one of those steps that often gets overlooked, yet it can make a real difference to how a site performs in search engines.…