It is a fast tutorial on methods to correctly leverage the facility of Git LFS when you may have a git repository with FiveM server sources. If you happen to’re utilizing git, however not LFS (yikes), I urge you to strive it out.


First, be sure that your working listing is obvious so that you don’t by chance commit something you don’t imply to.

Subsequent, you have to to change / append these settings to the .gitattributes file in your mission root.
If you happen to don’t have this file but, create it with the next contents:

.gitattributes

# FiveM belongings
*.yft filter=lfs diff=lfs merge=lfs -text
*.ytd filter=lfs diff=lfs merge=lfs -text
*.ymap filter=lfs diff=lfs merge=lfs -text
*.ydr filter=lfs diff=lfs merge=lfs -text
*.ybn filter=lfs diff=lfs merge=lfs -text
*.ymf filter=lfs diff=lfs merge=lfs -text
*.ydd filter=lfs diff=lfs merge=lfs -text
*.ytyp filter=lfs diff=lfs merge=lfs -text
*.rpf filter=lfs diff=lfs merge=lfs -text

# native binaries
*.dll filter=lfs diff=lfs merge=lfs -text
*.so filter=lfs diff=lfs merge=lfs -text

# fonts
*.eot filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.woff filter=lfs diff=lfs merge=lfs -text
*.woff2 filter=lfs diff=lfs merge=lfs -text

At this level all it is best to have to do is:

git add .

Git will robotically index your recordsdata, discover any matching extensions, and mark them as modified, able to be dedicated to your Git repo utilizing LFS. The preliminary push might take a very long time when you’ve got a whole lot of sources.

That’s it of us.



Looking for a FiveM Server host? Click here