Official Git LFS Tracking List For UE4

File types to track with Git LFS, please add to the list if there are any missed.

*.umap
*.uasset
*.uproject
*.wav
*.fbx

2 Likes

I’m storing my blender files also within the project, so .blend would be an addition in that case. Did you set git lfs for specific paths within a project (or for the whole project)?

Thanks for posting this, has saved me a bunch of time. Are you sure about the *.uproject files? Those are plaintext, as far as I can tell?

1 Like

This is great, thanks for posting. Super helpful for me and I’m sure others

Here’s an extended list

*.umap
*.uasset
*.uproject
*.wav
*.fbx
*.blend
*.obj
*.png
*.jpg
*.jpeg
*.hdr
*.exr
*.mp3
*.mp4
*.mov
*.psd
*.mb
*.tga
*.cubemap
*.tif
*.bin.fbx
*.upk
*.udk
*.duf

Cred: Unreal Engine 4 + GitHub First Steps – Oded Erell's CG Log

First post!

1 Like

Place this inside your .gitattributes file and adjust to your needs


# Auto detect text files and perform LF normalization
* text=auto
# UE file types
*.uasset filter=lfs diff=lfs merge=lfs -text
*.umap filter=lfs diff=lfs merge=lfs -text
*.udk filter=lfs diff=lfs merge=lfs -text
*.upk filter=lfs diff=lfs merge=lfs -text
# Anything in `/RawContent` dir. [You create this directory in your projects root folder]
/RawContent/**/* filter=lfs diff=lfs merge=lfs -text
# Raw Content types
*.blend filter=lfs diff=lfs merge=lfs -text
*.duf filter=lfs diff=lfs merge=lfs -text
*.bin.fbx filter=lfs diff=lfs merge=lfs -text
*.fbx filter=lfs diff=lfs merge=lfs -text
*.obj filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.jpg filter=lfs diff=lfs merge=lfs -text
*.jpeg filter=lfs diff=lfs merge=lfs -text
*.hdr filter=lfs diff=lfs merge=lfs -text
*.exr filter=lfs diff=lfs merge=lfs -text
*.mp3 filter=lfs diff=lfs merge=lfs -text
*.mp4 filter=lfs diff=lfs merge=lfs -text
*.mov filter=lfs diff=lfs merge=lfs -text
*.wav filter=lfs diff=lfs merge=lfs -text
*.3ds filter=lfs diff=lfs merge=lfs -text
*.psd filter=lfs diff=lfs merge=lfs -text
*.mb filter=lfs diff=lfs merge=lfs -text
*.tga filter=lfs diff=lfs merge=lfs -text
*.cubemap filter=lfs diff=lfs merge=lfs -text
*.tif filter=lfs diff=lfs merge=lfs -text
*.xcf filter=lfs diff=lfs merge=lfs -text

5 Likes

.uproject files are text so I would not add those to git lfs (as others have mentioned).

Hello,

Is this still the correct way to manage unreal projects with git?

Is there a quicker/easier way to do this than adding each file type one at a time using the console, because this feels really long-winded? For example, is it possible to edit the .gitattributes file directly?

Is this what the code snippet posted by Deja_Vudu does?

Yes, you can make a file .gitattributes, edit it directly, place it in your repo, and tell git to use it with:

git add .gitattributes

Then run

git lfs track

to see the list of currently tracked files, which will include all the ones listed in the attributes file

I have been building my own .gitattributes file, based on my experience and the official Unreal Engine documentation.

copy and paste this inside your .gitattributes file:

## Unreal Engine ##
## Auto detect text files and perform LF normalization ##

* text=auto

# UE file types
*.uasset filter=lfs diff=lfs merge=lfs -text
*.umap filter=lfs diff=lfs merge=lfs -text
*.udk filter=lfs diff=lfs merge=lfs -text
*.upk filter=lfs diff=lfs merge=lfs -text

--------------------------------------------------

# 2D formats
# Read more in: https://docs.unrealengine.com/4.26/en-US/RenderingAndGraphics/Textures/Importing/

# Recommended use:
*.[tT][gG][aA] filter=lfs diff=lfs merge=lfs -text
*.[pP][nN][gG] filter=lfs diff=lfs merge=lfs -text
*.[bB][mM][pP] filter=lfs diff=lfs merge=lfs -text

# Can also be used:
*.[fF][lL[oO][aA][tT] filter=lfs diff=lfs merge=lfs -text
*.[jJ][pP][eE][gG] filter=lfs diff=lfs merge=lfs -text
*.[jJ][pP][gG] filter=lfs diff=lfs merge=lfs -text
*.[pP][cC][xX] filter=lfs diff=lfs merge=lfs -text
*.[pP][sS][dD] filter=lfs diff=lfs merge=lfs -text
*.[xX][cC][fF] filter=lfs diff=lfs merge=lfs -text
*.[tT][iI][fF] filter=lfs diff=lfs merge=lfs -text
*.[tT][iI][fF][fF] filter=lfs diff=lfs merge=lfs -text

# Other supported formats:
*.[hH][dD][rR] filter=lfs diff=lfs merge=lfs -text
*.[dD][dD][sS] filter=lfs diff=lfs merge=lfs -text
*.[eE][xX][rR] filter=lfs diff=lfs merge=lfs -text

--------------------------------------------------

# 3D formats

# Always recommended to use:
# The UE4 FBX import pipeline uses FBX 2018
*.[fF][bB][xX] filter=lfs diff=lfs merge=lfs -text

# Can also be used:
*.[oO][bB][jJ] filter=lfs diff=lfs merge=lfs -text

# Other supported formats:
*.[aA][bB][cC] filter=lfs diff=lfs merge=lfs -text
*.[sS][rR][tT] filter=lfs diff=lfs merge=lfs -text

--------------------------------------------------

# Audio formats
# Read more in: https://docs.unrealengine.com/4.27/en-US/WorkingWithAudio/Overview/#:~:text=Unreal%20Engine%204%20(UE4)%20supports,16%2Dbit%20format%20PCM%20files.

# Always recommended to use:
*.[wW][aA][vV] filter=lfs diff=lfs merge=lfs -text

# Can also be used:
*.[aA][iI][fF][fF] filter=lfs diff=lfs merge=lfs -text
*.[oO][gG][gG] filter=lfs diff=lfs merge=lfs -text
*.[fF][lL][aA][cC] filter=lfs diff=lfs merge=lfs -text

# Not recommended to use, but supported:
*.[mM][pP]3 filter=lfs diff=lfs merge=lfs -text
* [wW][mM][aA] filter=lfs diff=lfs merge=lfs -text
*.[aA][cC]3 filter=lfs diff=lfs merge=lfs -text
*.[aA][mM][rR] filter=lfs diff=lfs merge=lfs -text
*.[aA][iI][fF] filter=lfs diff=lfs merge=lfs -text
*.[aA][uU] filter=lfs diff=lfs merge=lfs -text
*.[cC][dD][dD][aA] filter=lfs diff=lfs merge=lfs -text
*.[cC][aA][fF] filter=lfs diff=lfs merge=lfs -text
*.[bB][wW][fF] filter=lfs diff=lfs merge=lfs -text
*.[aA][dD][tT][sS] filter=lfs diff=lfs merge=lfs -text

--------------------------------------------------

# Video formats
# Read more in: https://docs.unrealengine.com/5.0/en-US/media-framework-technical-reference-for-unreal-engine/

# Always recommended to use, supports all platforms:
# For the best compatibility and performance, it is recommended to use H.264 encoded MP4 (.mp4) container files.
*.[mM][pP]4 filter=lfs diff=lfs merge=lfs -text

Can also be used, only some platforms are supported:
*.3[gG]2 filter=lfs diff=lfs merge=lfs -text
*.3[gG][pP] filter=lfs diff=lfs merge=lfs -text
*.3[gG][pP]2 filter=lfs diff=lfs merge=lfs -text
*.3[gG][pP][pP] filter=lfs diff=lfs merge=lfs -text
*.[mM]4[aA] filter=lfs diff=lfs merge=lfs -text
*.[mM]4[vV] filter=lfs diff=lfs merge=lfs -text
*.[mM][o][vV] filter=lfs diff=lfs merge=lfs -text
*.[aA][sS][fF] filter=lfs diff=lfs merge=lfs -text
*.[aA][vV][iI] filter=lfs diff=lfs merge=lfs -text
*.[wW][mM][vV] filter=lfs diff=lfs merge=lfs -text

--------------------------------------------------

# Fonts
# Read more in: https://docs.unrealengine.com/5.0/en-US/importing-fonts-in-unreal-engine/

*.[tT][tT][fF] filter=lfs diff=lfs merge=lfs -text
*.[oO][tT][fF] filter=lfs diff=lfs merge=lfs -text

--------------------------------------------------

# Documents
*.[cC][sS][vV] filter=lfs diff=lfs merge=lfs -text

# This is optional, to store information you want to share in the repository as documentation about the project, remove it if you don't need it.
*.[pP][dD][fF] filter=lfs diff=lfs merge=lfs -text
3 Likes

How do i get this for metahuman, right now my metahuman face 8k asset is not being pushed to lfs