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

# Visual Studio 2015 database file

# Compiled Object files

# Precompiled Headers

# Compiled Dynamic libraries

# Fortran module files

# Compiled Static libraries

# Executables

# These project files can be generated by the engine

# Precompiled Assets

# Binary Files

# Builds

# Whitelist PakBlacklist-<BuildConfiguration>.txt files

# Don't ignore icon files in Build

# Built data for maps

# Configuration files generated by the Editor

# Compiled source files for the engine to use

# Cache files for the editor to use

# Starter Content Ignored


VSCode Files

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

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.