I know things like this have been asked before. I’ve read through a dozen threads between here and StackOverflow and I haven’t found a solution that works for my situation. Apologies ahead of time for possibly beating a dead horse some more.
The short of it is that my gitignore doesn’t seem to work. I’ll post my current gitignores at the bottom. I have tried many other versions. I added a little bit to the gitignore in the problem project to test.
I’m working through an Udemy course for Unity and C# and I’m trying to use GitHub for version control because I’m playing with things beyond what the course is doing. I have multiple projects in my repo because the course covers different types of games. I have tried placing the gitignore in the root of the repo outside of individual projects, and I have tried placing copies inside of individual projects root folders.
It wasn’t a problem with the first two projects but the third, Coyote McRain, uses asset packs from the Unity Asset Store. As soon as I painted some asset pack textures to my terrain I couldn’t push to GitHub anymore and I started digging to find the problem. No gitignore version that I’ve tried has stopped Library or other folders/files from being committed.
I have made sure that Asset Serialization Mode is Force Text and Version Control is Visible Meta Files in Unity. I tried creating a new repo to start fresh and just copy pasta the individual project folders over. Still doesn’t work. I’m completely lost here.
Just in case it helps I’ll put my repo links.
Original: GitHub - RustyDeGarmo/Udemy-Csharp-Unity-Game-Development: Udemy course for learning game development with C# and Unity
Test: https://github.com/RustyDeGarmo/UnityTest
gitignore used in most places:
This .gitignore file should be placed at the root of your Unity project directory
Get latest from gitignore/Unity.gitignore at main · github/gitignore · GitHub
**/[Ll]ibrary/
**/
emp/
**/[Oo]bj/
**/[Bb]uild/
**/[Bb]uilds/
**/[Ll]ogs/
**/[Uu]ser[Ss]ettings/
# MemoryCaptures can get excessive in size.
# They also could contain extremely sensitive data
**/[Mm]emoryCaptures/
# Recordings can get excessive in size
**/[Rr]ecordings/
# Uncomment this line if you wish to ignore the asset store tools plugin
# /[Aa]ssets/AssetStoreTools*
# Autogenerated Jetbrains Rider plugin
**/[Aa]ssets/Plugins/Editor/JetBrains*
# Visual Studio cache directory
.vs/
# Gradle cache directory
.gradle/
# Autogenerated VS/MD/Consulo solution and project files
**/ExportedObj/
.consulo/
*.csproj
*.unityproj
*.sln
*.suo
*.tmp
*.user
*.userprefs
*.pidb
*.booproj
*.svd
*.pdb
*.mdb
*.opendb
*.VC.db
# Unity3D generated meta files
*.pidb.meta
*.pdb.meta
*.mdb.meta
# Unity3D generated file on crash reports
sysinfo.txt
# Builds
*.apk
*.aab
*.unitypackage
*.app
# Crashlytics generated file
crashlytics-build.properties
# Packed Addressables
**/[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*/*.bin*
# Temporary auto-generated Android Assets
**/[Aa]ssets/[Ss]treamingAssets/aa.meta
**/[Aa]ssets/[Ss]treamingAssets/aa/*
gitignore used in Starship Coyote project root is basically the same but I added the following to the bottom:
/[Ll]ibrary/
/[Tt]emp/
/[Oo]bj/
/[Bb]uild/
/[Bb]uilds/
/[Ll]ogs/
/[Uu]ser[Ss]ettings/