Shopping Cart
FiveM script 11abac85b780a6bfb422bb414511bacab31e72a7

[Tutorial] Using Git LFS with FiveM resources – Server Tutorials

[ad_1]

This is a quick tutorial on how to properly leverage the power of Git LFS when you have a git repository with FiveM server resources. If you’re using git, but not LFS (yikes), I urge you to try it out.


First, make sure that your working directory is clear so you don’t accidentally commit anything you don’t mean to.

Next, you will need to modify / append these settings to the .gitattributes file in your project root.
If you don’t have this file yet, create it with the following contents:

.gitattributes

# FiveM assets
*.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 point all you should need to do is:

git add .

Git will automatically index your files, find any matching extensions, and mark them as changed, ready to be committed to your Git repo using LFS. The initial push may take a long time if you have a lot of resources.

That’s it folks.

[ad_2]

Premium ESX Scripts? Click here!

Leave a Reply
FiveM ESX Scripts

The best scripts and maps

Best support

Problems? We are there to help!

Wide range of products

We have a wide range of products

100% Secure Checkout

Stripe