Back to the series

Make a game website · GitHub Desktop tutorial

GitHub Desktop and Large Game Files

Continue the original file-upload tutorial, then plan for game assets that need more space.

When the browser uploader is too small

GitHub's browser uploader accepts files up to 25 MiB each. For larger ordinary Git files, you can use GitHub Desktop, up to GitHub's 100 MiB per-file limit. Larger files need a different approach; installing Desktop does not remove hosting or repository limits. See GitHub's file-upload documentation.

1. Clone your site with GitHub Desktop

Use a Mac or Windows computer where you can install applications. Download GitHub Desktop, install it and sign in to the account that owns your site repository.

  1. Choose File → Clone Repository.
  2. Select your site repository, or use its URL.
  3. Choose a local folder with enough free space, then click Clone.
  4. Open that folder in Finder or File Explorer. It contains the working copy of your website.

If your repository is already on this computer, use File → Add Local Repository instead of making another copy. GitHub documents both cloning a repository and adding an existing local repository.

2. Add and publish your files

  1. Copy your new HTML and game files into the local repository folder. Keep each game's folder structure intact.
  2. Return to GitHub Desktop and review the Changes list. Select the files you intend to publish and make sure no private files are included.
  3. Write a short summary, then choose Commit to your current branch. This saves a local revision.
  4. Choose Push origin to send that revision to GitHub. A local commit alone does not update the hosted site.
  5. If Pages is already configured for that branch, wait for its deployment, then test the live page. Otherwise, finish the Pages setup in Part 1.

For the current controls, see GitHub's commit and push guide.

Check limits before choosing where files live

Hosting services set their own limits for individual files, total storage, build size, and monthly transfer. For example, published GitHub Pages sites may be no larger than 1 GB. A file that uploads successfully may still exceed a serving or bandwidth limit. Check the current Pages limits before publishing a large library.

Reduce only what can safely be reduced

Avoid embedding a large game in HTML as Base64. It makes the HTML much larger, uses extra memory during decoding, and prevents the browser from caching each asset separately. Keep large assets as files.

Choose storage that fits the project

If your Git host supports Git LFS, it can keep large binary objects outside normal Git history, but LFS storage and download quotas still apply. A compatible object-storage service or asset host may also work. Make sure the game’s paths, content type, cross-origin rules, and any required range requests are supported by the chosen host.

Keep a complete backup

Back up the original assets and the source separately from the live website. For Git LFS projects, confirm that the actual LFS objects are included, not only the small pointer files in Git. Keep a manifest of filenames and sizes so you can spot an incomplete copy.

Test the published game

  1. Open the game from the deployed site, not only from a local file.
  2. Check the browser’s Network panel for 404s and failed large responses.
  3. Test a fresh load with cache disabled, then check a second load with cache enabled.
  4. Test on a typical school or mobile connection if those users matter to your site.