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
Latest posts
—
Core Web Vitals: Optimisation techniques
Google's Core Web Vitals have become the de facto standard for measuring user experience on the web. For years, developers have focused on the foundational trio: Largest Contentful Paint (LCP),…
Continue reading "Core Web Vitals: Optimisation techniques "
—
Web Safe Fonts: A Quick Explainer for Developers
If you've ever built a website and wondered why your carefully chosen typography looks completely different on someone else's screen, you've encountered the world of web safe fonts. Let's break…
Continue reading "Web Safe Fonts: A Quick Explainer for Developers "
—
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"
—
WYSIWYG or plain-text CMS editing?
Finding the Right Balance for Your CMS UsersWhen configuring a content‑management system (CMS), the choice between a WYSIWYG (What‑You‑See‑Is‑What‑You‑Get) editor and a plain‑text interface has far‑reaching implications for both usability…