Skip to main content

GitHub Setup

GitHub works for VRChat projects but needs extra setup for large files like textures and models using Git LFS.

Setup for GitHub

Step 1: Create Accounts

  1. Go to github.com
  2. Sign up for free accounts (all collaborators)

Step 2: Install Git and Git LFS

  1. Download Git from git-scm.com
  2. Install it on all computers
  3. Download Git LFS from git-lfs.github.com
  4. Install Git LFS and run: git lfs install in a terminal

Step 3: Install GitHub Desktop (Easier Option)

  1. Download GitHub Desktop from desktop.github.com
  2. Install and sign in with your GitHub account
  3. Much easier than using command line!

Step 4: Create the Repository (Project Owner)

  1. Open GitHub Desktop
  2. Click "File" → "New Repository"
  3. Name it (e.g., "my-vrchat-project")
  4. Choose your Unity project folder as the location
  5. Check "Initialize with README"
  6. Click "Create Repository"

Step 5: Set Up Git LFS (IMPORTANT!)

You need to tell Git to use LFS for large files:

  1. Open GitHub Desktop
  2. Click "Repository" → "Open in Terminal" (or Command Prompt)
  3. Type these commands one at a time:
git lfs track "*.psd"
git lfs track "*.png"
git lfs track "*.jpg"
git lfs track "*.jpeg"
git lfs track "*.tga"
git lfs track "*.tif"
git lfs track "*.tiff"
git lfs track "*.fbx"
git lfs track "*.obj"
git lfs track "*.wav"
git lfs track "*.mp3"
git lfs track "*.ogg"
git lfs track "*.mp4"
git lfs track "*.mov"
git lfs track "*.blend"
git lfs track "*.prefab"
git lfs track "*.unity"
git lfs track "*.asset"
git lfs track "*.controller"
git lfs track "*.mat"

Step 6: Create .gitignore File

  1. In your project folder, create a file called .gitignore (yes, with the dot at the start)
  2. Add these lines:
[Ll]ibrary/
[Tt]emp/
[Oo]bj/
[Ll]ogs/
*.csproj
*.unityproj
*.sln
*.user
*.userprefs
*.pidb
*.booproj
[Uu]ser[Ss]ettings/
.vs/
.vscode/

Step 7: First Commit (Project Owner)

  1. In GitHub Desktop, you'll see all your files
  2. Write a summary like "Initial project setup"
  3. Click "Commit to main"
  4. Click "Publish repository"
  5. Choose "Private" to keep it secret
  6. Click "Publish Repository"

Step 8: Add Collaborator (Project Owner)

  1. Go to github.com and sign in
  2. Find your repository
  3. Click "Settings" → "Collaborators"
  4. Click "Add people"
  5. Enter your collaborators' GitHub usernames
  6. They'll get email invitations

Step 9: Clone the Project (Collaborators Do This)

  1. Open GitHub Desktop
  2. Click "File" → "Clone Repository"
  3. Find the shared repository in the list
  4. Choose where to save it on your computer
  5. Click "Clone"
  6. Wait for everything to download (might take a while!)

Daily Workflow with GitHub

Before You Start Working:

  1. Open GitHub Desktop
  2. Click "Fetch origin" then "Pull origin"
  3. This downloads any changes your collaborators made

After Making Changes:

  1. Open GitHub Desktop
  2. You'll see all changed files listed
  3. Write a summary of what you changed (e.g., "Updated world lighting")
  4. Click "Commit to main"
  5. Click "Push origin" to upload your changes

If There's a Conflict:

If multiple people changed the same file:

  1. GitHub Desktop will warn you about conflicts
  2. Click "Open in [your editor]"
  3. Look for sections marked with <<<<<<< and >>>>>>>
  4. Decide which version to keep
  5. Save the file, then commit again

Troubleshooting

"Files are too large" (GitHub)

  • Make sure Git LFS is installed and tracking the file types
  • Run git lfs track "*.fileextension" for new file types
  • Check .gitattributes file exists

"Stuck on 'Updating' or 'Fetching'"

  • Check your internet connection
  • Large files take time to upload/download
  • Be patient, especially the first time

Quick Reference

GitHub Desktop Commands

  • Fetch/Pull = Download collaborators' changes
  • Commit = Save your changes locally
  • Push = Upload your changes to GitHub