Skip to content

Instantly share code, notes, and snippets.

@matniedoba
Last active January 25, 2024 07:37
  • Star 8 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save matniedoba/8bc95c3305cc80de25c69d4669269c7b to your computer and use it in GitHub Desktop.
* text=auto
# Unity files
*.meta -text merge=unityyamlmerge diff
*.unity -text merge=unityyamlmerge diff
*.asset -text merge=unityyamlmerge diff
*.prefab -text merge=unityyamlmerge diff
*.mat -text merge=unityyamlmerge diff
*.anim -text merge=unityyamlmerge diff
*.controller -text merge=unityyamlmerge diff
*.overrideController -text merge=unityyamlmerge diff
*.physicMaterial -text merge=unityyamlmerge diff
*.physicsMaterial2D -text merge=unityyamlmerge diff
*.playable -text merge=unityyamlmerge diff
*.mask -text merge=unityyamlmerge diff
*.brush -text merge=unityyamlmerge diff
*.flare -text merge=unityyamlmerge diff
*.fontsettings -text merge=unityyamlmerge diff
*.guiskin -text merge=unityyamlmerge diff
*.giparams -text merge=unityyamlmerge diff
*.renderTexture -text merge=unityyamlmerge diff
*.spriteatlas -text merge=unityyamlmerge diff
*.terrainlayer -text merge=unityyamlmerge diff
*.mixer -text merge=unityyamlmerge diff
*.shadervariants -text merge=unityyamlmerge diff
# Unreal files
*.locres filter=lfs diff=lfs merge=lfs -text
*.locmeta filter=lfs diff=lfs merge=lfs -text
*.ico filter=lfs diff=lfs merge=lfs -text
*.uasset filter=lfs diff=lfs merge=lfs -text
*.umap filter=lfs diff=lfs merge=lfs -text
*.3DS filter=lfs diff=lfs merge=lfs -text
*.3ds filter=lfs diff=lfs merge=lfs -text
*.ABC filter=lfs diff=lfs merge=lfs -text
*.AEP filter=lfs diff=lfs merge=lfs -text
*.AFDESIGN filter=lfs diff=lfs merge=lfs -text
*.AFPHOTO filter=lfs diff=lfs merge=lfs -text
*.AI filter=lfs diff=lfs merge=lfs -text
*.AIF filter=lfs diff=lfs merge=lfs -text
*.AVI filter=lfs diff=lfs merge=lfs -text
*.BGEO filter=lfs diff=lfs merge=lfs -text
*.BIN filter=lfs diff=lfs merge=lfs -text
*.BLEND filter=lfs diff=lfs merge=lfs -text
*.BMP filter=lfs diff=lfs merge=lfs -text
*.BPOLY filter=lfs diff=lfs merge=lfs -text
*.C4D filter=lfs diff=lfs merge=lfs -text
*.DOC filter=lfs diff=lfs merge=lfs -text
*.DOCX filter=lfs diff=lfs merge=lfs -text
*.DWG filter=lfs diff=lfs merge=lfs -text
*.DXF filter=lfs diff=lfs merge=lfs -text
*.EXR filter=lfs diff=lfs merge=lfs -text
*.FBX filter=lfs diff=lfs merge=lfs -text
*.GEO filter=lfs diff=lfs merge=lfs -text
*.GI filter=lfs diff=lfs merge=lfs -text
*.GI2 filter=lfs diff=lfs merge=lfs -text
*.GIF filter=lfs diff=lfs merge=lfs -text
*.GLB filter=lfs diff=lfs merge=lfs -text
*.GLTF filter=lfs diff=lfs merge=lfs -text
*.HDR filter=lfs diff=lfs merge=lfs -text
*.HIP filter=lfs diff=lfs merge=lfs -text
*.HIPLC filter=lfs diff=lfs merge=lfs -text
*.HIPNC filter=lfs diff=lfs merge=lfs -text
*.JPEG filter=lfs diff=lfs merge=lfs -text
*.JPG filter=lfs diff=lfs merge=lfs -text
*.MA filter=lfs diff=lfs merge=lfs -text
*.MAX filter=lfs diff=lfs merge=lfs -text
*.MB filter=lfs diff=lfs merge=lfs -text
*.MOV filter=lfs diff=lfs merge=lfs -text
*.MP3 filter=lfs diff=lfs merge=lfs -text
*.MP4 filter=lfs diff=lfs merge=lfs -text
*.MPEG filter=lfs diff=lfs merge=lfs -text
*.MPG filter=lfs diff=lfs merge=lfs -text
*.OBJ filter=lfs diff=lfs merge=lfs -text
*.PDF filter=lfs diff=lfs merge=lfs -text
*.PFM filter=lfs diff=lfs merge=lfs -text
*.PIC filter=lfs diff=lfs merge=lfs -text
*.PMB filter=lfs diff=lfs merge=lfs -text
*.PNG filter=lfs diff=lfs merge=lfs -text
*.POLY filter=lfs diff=lfs merge=lfs -text
*.PPT filter=lfs diff=lfs merge=lfs -text
*.PPTX filter=lfs diff=lfs merge=lfs -text
*.PROFRAW filter=lfs diff=lfs merge=lfs -text
*.PRPROJ filter=lfs diff=lfs merge=lfs -text
*.PSB filter=lfs diff=lfs merge=lfs -text
*.PSD filter=lfs diff=lfs merge=lfs -text
*.RAT filter=lfs diff=lfs merge=lfs -text
*.RIB filter=lfs diff=lfs merge=lfs -text
*.SKETCH filter=lfs diff=lfs merge=lfs -text
*.STL filter=lfs diff=lfs merge=lfs -text
*.TAR filter=lfs diff=lfs merge=lfs -text
*.TIF filter=lfs diff=lfs merge=lfs -text
*.TIFF filter=lfs diff=lfs merge=lfs -text
*.USD filter=lfs diff=lfs merge=lfs -text
*.USDC filter=lfs diff=lfs merge=lfs -text
*.USDZ filter=lfs diff=lfs merge=lfs -text
*.VDB filter=lfs diff=lfs merge=lfs -text
*.WAV filter=lfs diff=lfs merge=lfs -text
*.XLS filter=lfs diff=lfs merge=lfs -text
*.XLSX filter=lfs diff=lfs merge=lfs -text
*.ZIP filter=lfs diff=lfs merge=lfs -text
*.abc filter=lfs diff=lfs merge=lfs -text
*.aep filter=lfs diff=lfs merge=lfs -text
*.afdesign filter=lfs diff=lfs merge=lfs -text
*.afphoto filter=lfs diff=lfs merge=lfs -text
*.ai filter=lfs diff=lfs merge=lfs -text
*.aif filter=lfs diff=lfs merge=lfs -text
*.avi filter=lfs diff=lfs merge=lfs -text
*.bgeo filter=lfs diff=lfs merge=lfs -text
*.bin filter=lfs diff=lfs merge=lfs -text
*.blend filter=lfs diff=lfs merge=lfs -text
*.bmp filter=lfs diff=lfs merge=lfs -text
*.bpoly filter=lfs diff=lfs merge=lfs -text
*.c4d filter=lfs diff=lfs merge=lfs -text
*.doc filter=lfs diff=lfs merge=lfs -text
*.docx filter=lfs diff=lfs merge=lfs -text
*.dwg filter=lfs diff=lfs merge=lfs -text
*.dxf filter=lfs diff=lfs merge=lfs -text
*.exr filter=lfs diff=lfs merge=lfs -text
*.fbx filter=lfs diff=lfs merge=lfs -text
*.geo filter=lfs diff=lfs merge=lfs -text
*.gi filter=lfs diff=lfs merge=lfs -text
*.gi2 filter=lfs diff=lfs merge=lfs -text
*.gif filter=lfs diff=lfs merge=lfs -text
*.glb filter=lfs diff=lfs merge=lfs -text
*.gltf filter=lfs diff=lfs merge=lfs -text
*.hdr filter=lfs diff=lfs merge=lfs -text
*.hip filter=lfs diff=lfs merge=lfs -text
*.hiplc filter=lfs diff=lfs merge=lfs -text
*.hipnc filter=lfs diff=lfs merge=lfs -text
*.jpeg filter=lfs diff=lfs merge=lfs -text
*.jpg filter=lfs diff=lfs merge=lfs -text
*.ma filter=lfs diff=lfs merge=lfs -text
*.max filter=lfs diff=lfs merge=lfs -text
*.mb filter=lfs diff=lfs merge=lfs -text
*.mov filter=lfs diff=lfs merge=lfs -text
*.mp3 filter=lfs diff=lfs merge=lfs -text
*.mp4 filter=lfs diff=lfs merge=lfs -text
*.mpeg filter=lfs diff=lfs merge=lfs -text
*.mpg filter=lfs diff=lfs merge=lfs -text
*.obj filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.pfm filter=lfs diff=lfs merge=lfs -text
*.pic filter=lfs diff=lfs merge=lfs -text
*.pmb filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.poly filter=lfs diff=lfs merge=lfs -text
*.ppt filter=lfs diff=lfs merge=lfs -text
*.pptx filter=lfs diff=lfs merge=lfs -text
*.profraw filter=lfs diff=lfs merge=lfs -text
*.prproj filter=lfs diff=lfs merge=lfs -text
*.psb filter=lfs diff=lfs merge=lfs -text
*.psd filter=lfs diff=lfs merge=lfs -text
*.rat filter=lfs diff=lfs merge=lfs -text
*.rib filter=lfs diff=lfs merge=lfs -text
*.sketch filter=lfs diff=lfs merge=lfs -text
*.stl filter=lfs diff=lfs merge=lfs -text
*.tar filter=lfs diff=lfs merge=lfs -text
*.tif filter=lfs diff=lfs merge=lfs -text
*.tiff filter=lfs diff=lfs merge=lfs -text
*.usd filter=lfs diff=lfs merge=lfs -text
*.usdc filter=lfs diff=lfs merge=lfs -text
*.usdz filter=lfs diff=lfs merge=lfs -text
*.vdb filter=lfs diff=lfs merge=lfs -text
*.wav filter=lfs diff=lfs merge=lfs -text
*.xls filter=lfs diff=lfs merge=lfs -text
*.xlsx filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
@Chreas
Copy link

Chreas commented Sep 21, 2022

In your blog post https://www.anchorpoint.app/blog/git-with-unreal-engine-5 you've linked to this .gitattributes file - but this one seems to be for Unity - at least the lines 3-25. Do you also have a recommendation for Unreal Engine 5?

@matniedoba
Copy link
Author

For Unreal you can simply add this:

*.locres filter=lfs diff=lfs merge=lfs -text
*.locmeta filter=lfs diff=lfs merge=lfs -text
*.ico filter=lfs diff=lfs merge=lfs -text
*.uasset filter=lfs diff=lfs merge=lfs -text
*.umap filter=lfs diff=lfs merge=lfs -text

We build a feature to Anchorpoint, that it automatically updates the .gitattributes file when it detects binaries before the commit. So that's why I have not updated this, because it's no longer needed when working with Anchorpoint

@Chreas
Copy link

Chreas commented Sep 22, 2022

Thanks for the info. I've tried Anchorpoint, but had a problem where it wouldn't be able to complete pushes again and I couldn't delete projects. Will try it out again possibly with a future project.

@matniedoba
Copy link
Author

We have fixed that issue. Unreal locks files, so Git can not do a proper rebase. Anchorpoint will tell you if you have to close a Map in Unreal to do the rebase.

In your case, Git was in a state where Anchorpoint could not handle it. But that's fixed now :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment