PiTyUs.Hire me

Engineering

Using Git to manage FiveM resources

Put a FiveM server or script under Git: what to commit and what to ignore, a .gitignore for server-data, keeping licence keys and tokens out of the repo, large streamed assets and Git LFS, branches for testing, private GitHub repos, and deploying with git pull.

Updated 10 min readBy PiTyUs · FiveM developer

Overview

“Who changed the garage config?” and “it worked yesterday” stop being mysteries once your server is in Git. Every change has an author, a date and a message, broken edits can be undone in seconds, and a test server can run a branch before it reaches players.

01Setting up the repository

In your server-data folderbash
git init
git add .
git commit -m "Initial server state"
git branch -M main
git remote add origin [email protected]:you/your-server.git
git push -u origin main

What to ignore

.gitignoretext
# FXServer generated
cache/
*.log

# txAdmin data
txData/

# secrets
secrets.cfg
*.env

# node / build output of NUI projects
node_modules/
web/dist/

# OS junk
Thumbs.db
.DS_Store

Whether to commit NUI build output depends on your deploy: if the server does not build, commit the built files and ignore only node_modules.

Keeping secrets out

server.cfg (committed)cfg
exec secrets.cfg
ensure oxmysql
ensure ox_lib
secrets.cfg (ignored)cfg
sv_licenseKey "..."
set mysql_connection_string "mysql://fivem:...@localhost/fivem"
set discord_bot_token "..."

Large streamed assets

Vehicle and map packs can be gigabytes. GitHub warns on files over 50 MB and blocks files over 100 MB. Use Git LFS for large binary assets, or keep asset packs in a separate storage and only version scripts and configs.

A simple workflow

  1. Create a branch for a change: git switch -c garage-rework.
  2. Test it on a local or test server — see local development server.
  3. Commit with a clear message, merge into main.
  4. On the live server: git pull, then ensure or restart the changed resources.

Paid and escrowed resources

Purchased resources are licensed to you; putting them in a public repository redistributes them. Keep server repos private, and never publish escrowed files — see asset escrow explained.

Frequently asked questions

Should I put my FiveM server in Git?

Yes — at least resources and configs. It gives you history, undo and safe deploys.

What should a FiveM .gitignore contain?

cache/, logs, txData/, secret files, node_modules/ and build output you do not deploy.

How do I keep my license key out of GitHub?

Put it in a secrets.cfg that server.cfg execs, and add that file to .gitignore.

Can I push large vehicle packs to GitHub?

Files over 100 MB are blocked. Use Git LFS or store large assets elsewhere.

Need this built, not just explained?

Ten years of FiveM work, from Lua to NUI

Custom resources, React NUI, ESX / QBCore / Qbox integration, OneSync performance audits and security reviews — plus the websites and SEO around your server brand.

Related guides