GitHub, GitHub Desktop, LFS, and Unity

How to Set Up a Unity Project that Uses GitHub

Huh? What is all this stuff?

  • Git is an version control system for coding and development. It facilitates collaboration and keeps back ups of your projects as you work.
  • GitHub is a website that uses git. It is where your project will be stored. It is ubiquitous in software development and is valuable to have in your skillset and on your resume. A free account allows you to make private projects with three collaborators and public accounts with unlimited collaborators.
  • GitHub Desktop is software that you install on your local computer that makes using GitHub easier. Without it, you'd need to use the command line.
  • LFS stands for Large File Storage. Git wasn't designed to work well with large files. This software allows you to upload and manage large files (for art assets, sounds, etc...). Once it's installed and you copy the gitattributes file into your repository, you can forget about it for the most part.


Give yourself 15-20 minutes to do this. After you do it once, it gets a lot easier.

  1. Install Git for Windows.
    • The install process asks a lot of questions. Just choose all of the default install options (VIM, Git from the command line, OpenSSL, Checkout Windows-style, Use MinTTy...).
  2. Set up an account on GitHub and log in.
  3. Download and install GitHub Desktop.
  4. Download and install LFS.
    • Navigate to and click Download.
    • Open Git Bash (by typing Git Bash in the Windows search box).
    • Verify that the installation was successful by typing:
      $ git lfs install
      > Git LFS initialized.
  5. Add your Unity Project to GitHub Desktop.
    • Find the Unity Project you want to upload on your computer.
    • Open GitHub Desktop and click File > New Repository.
    • IMPORTANT! Setting these two fields are important.
      • Name: This should be the exact name of your Unity project.
      • Local Path: This should be the path to the parent folder of your Unity project's folder.
    • Select Unity from the Git Ignore dropdown.
    • Click Create Repository.
  6. Download this .gitattributes file.
      • Put it in your Unity project folder.
      • You will need to show hidden files to see this file. Do that by pressing Command + Shift + Period.
  7. Commit all your Unity files in GitHub Desktop.
    • Give a very brief description of what you've changed (first commit is usually "initial commit."
    • Click Commit to master.
    • Need help? Find a link to a video about committing files here.
  8. Publish Your Repository to GitHub.
  9. Confirm.
    • Click View on GitHub to see your project on GitHub.