Git Repo issues

So after starting to create my own Dungeon level from assets, I got from the Unreal store, all of a sudden my git started tracking what I think is every file. I have the gitignore file in place and was using it through the course. Github started failing my push to repo over and over. I was three commits in the hole and tried Gitlab. Currently, it’s 66% and almost 2 gigs. No wonder github was failing because of the repo limit. Please please walk me through what to add in the gitignore file and what to zip up currently int he repo. This is nuts. I do not want to have unnecessary files take up space and my time.

I already understand that what is already in my repo will not change when I update the gitignore file

Writing objects: 66% (446/674), 1.82 GiB | 4.03 MiB/s

gitignore file

# Visual Studio 2015 user specific files
.vs/

# Visual Studio 2015 database file
*.VC.db

# Compiled Object files
*.slo
*.lo
*.o
*.obj

# Precompiled Headers
*.gch
*.pch

# Compiled Dynamic libraries
*.so
*.dylib
*.dll

# Fortran module files
*.mod

# Compiled Static libraries
*.lai
*.la
*.a
*.lib

# Executables
*.exe
*.out
*.app
*.ipa

# These project files can be generated by the engine
*.xcodeproj
*.xcworkspace
*.sln
*.suo
*.opensdf
*.sdf
*.VC.db
*.VC.opendb

# Precompiled Assets
SourceArt/**/*.png
SourceArt/**/*.tga

# Binary Files
Binaries/*
Plugins/*/Binaries/*

# Builds
Build/*

# Whitelist PakBlacklist-<BuildConfiguration>.txt files
!Build/*/
Build/*/**
!Build/*/PakBlacklist*.txt

# Don't ignore icon files in Build
!Build/**/*.ico

# Built data for maps
*_BuiltData.uasset

# Configuration files generated by the Editor
Saved/*

# Compiled source files for the engine to use
Intermediate/*
Plugins/*/Intermediate/*

# Cache files for the editor to use
DerivedDataCache/*

# Starter Content Ignored

Content/StarterContent/*

VSCode Files
/.vscode/*
BuildingEscape.code-workspace

Any help? I think adding /content/* would eliminate all map files. i just care about the .h and .cpp no trying to pull from git source and recreate the game.

You can add the following lines to your .gitignore file to ignore any files within the Content directory in the future (so any assets / maps).

# Ignore Content Folder
Content/*

However, if you have committed those files already, they will still be in the repo. You can remove them by doing this :

git rm -r --cached Content
git commit -m 'Removed files from Content folder'

Then you push this commit to the remote repo. The next time anybody will try to fetch, they won’t need to download the whole content folder.

If you don’t need the whole commit history, you could just create a new git repo with the right gitignore file (with the line that says to ignore files from the Content folder), and then push the files that to a new remote repo, which will only contain the source code and the config files and thus won’t bloat your remote repo and will be very fast.

Privacy & Terms