dwyl / contributing

:clipboard: Guidelines & Workflow for people contributing to our project(s) on GitHub. Please :star: to confirm you've read & understood! :white_check_mark:
86 stars 9 forks source link

advise people to not include images (or other binary files) in git repos #22

Open nelsonic opened 7 years ago

nelsonic commented 7 years ago

Git is meant for source code and other (text-based) files that require version control. Images and other binary files are difficult for a human to review in a GitHub Pull Request and they end up taking up a lot of space in the git repository.

This means that when ever a person clones/pulls the code they have to download many/huge files (not just the code which is typically tiny by comparison)

A project we have been working on included a few binary files and, because Git tracks those files forever, each time anyone attempts to download the repo it's unnecessarily _huge_:

git-best-practices-dont-include-images-or-binaries-in-projects

on a slow-ish connection this git pull took 20mins ... 😢

This is a general git "best practice" to avoid clogging up your Git repo with files that don't need to be under version control.

if we are trying to avoid excluding people on slow internet, we have to make this a rule.

Thankfully, with images it's easy to simply drag-and-drop (or paste) the image into a github issue/pr comment and then copy-paste the resulting markdown into your text file. #easy

see: https://robinwinslow.uk/2013/06/11/dont-ever-commit-binary-files-to-git/