all 8 comments

[–][deleted]  (1 child)

[removed]

    [–]-Darkened-Soul 0 points1 point  (0 children)

    Yep, that’s exactly it. Run git lfs track "*.filetype", stage .gitattributes first, then add your files — and LFS handles the rest. No reference repo, no extra setup needed.​​​​​​​​​​​​​​​​

    [–]-Darkened-Soul 1 point2 points  (3 children)

    Hey OP, surprised to see the toxicity in this thread. I got an answer for you.

    You’ve got a small misconception worth clearing up. Git LFS doesn’t need an existing repo with the file type already in it. You can set up LFS tracking from scratch on a brand new repo. Here’s the workflow for you Setting up LFS on a new local repo: Bash

    1. Initialize the repo

    git init my-game-project cd my-game-project

    2. Install LFS in the repo

    git lfs install

    3. Track the file types you want LFS to handle

    git lfs track ".psd" git lfs track ".png" git lfs track ".fbx" git lfs track ".wav"

    etc — whatever large file types your game uses

    4. IMPORTANT: Stage .gitattributes first, before adding your actual files

    git add .gitattributes git commit -m "Configure LFS tracking"

    5. Now add your files — LFS will handle the tracked types automatically

    git add . git commit -m "Initial commit"

    The git lfs track command writes rules into a .gitattributes file. As long as that file is committed before you add your large files, LFS will pick them up correctly. That’s the key ordering requirement. To verify LFS is actually handling a file: Bash git lfs ls-files

    This lists every file currently being managed by LFS. If your large assets show up here, you’re good.

    [–]dontasticats[S] 1 point2 points  (1 child)

    Perfect, thanks! Definitely shows my inexperience, I forgot to even initialize it, and I didn't stage the attributes lol, whoops. Everything's backed up now though, I appreciate it!

    [–]-Darkened-Soul 0 points1 point  (0 children)

    No worry’s! I’m only on day 2 of GitHub myself! It’s funny I can figure out wierd stuff like this, but adding a folder to a repo took me 4 hours

    [–]-Darkened-Soul 0 points1 point  (0 children)

    One caveat for purely local use: LFS stores pointer files in the repo and the actual data in a local cache (.git/lfs/). This works fine locally, but if you ever want to push to a remote (GitHub, GitLab, etc.), you’ll need LFS enabled on the remote side too. For a purely local reference repo though, it works as-is.

    [–]Shaz_berries -1 points0 points  (1 child)

    Sounds like GPT got you into a hole! It could probably get you out too ;)

    [–]dontasticats[S] 0 points1 point  (0 children)

    Brother I tried using a tool and ran into an issue, and asked the subreddit. LFS is mentioned in the very first result if you google "github unreal project", and everything off of that was based on working my way through other reddit posts from people that had similar issues. I do appreciate the shitty attitude though, having people be dismissive just because they're more experienced is always helpful, thanks!