Library/ArtifactDB keeps appearing in git changes even when using valid .gitignore


So my issue is that Library/ArtifactDB (among other files) keeps appearing in my local changes even when using a valid .gitignore (see below).
Even if I manage tp hide it, it keeps appearing every time I open my project.
I’m using GitlabDesktop for source management.

Is anyone else experiencing this issue?

    # MemoryCaptures can get excessive in size.
    # They also could contain extremely sensitive data
    # Recordings can get excessive in size
    # Uncomment this line if you wish to ignore the asset store tools plugin
    # /[Aa]ssets/AssetStoreTools*
    # Autogenerated Jetbrains Rider plugin
    # Visual Studio cache directory
    # Gradle cache directory
    # Autogenerated VS/MD/Consulo solution and project files
    # Unity3D generated meta files
    # Unity3D generated file on crash reports
    # Builds
    # Crashlytics generated file
    # Packed Addressables
    # Temporary auto-generated Android Assets

Hey there!

Can you check that …

  1. …your .gitignore is not ending in .txt or something else (also check if you’re hiding file extensions in the Explorer or Finder). It should just be called “.gitignore”, nothing else.

  2. …your project folder structure is correct & .gitignore is in the correct folder. Afaik, if you specify a path in your .gitignore files (like you are doing with eg “/[Ll]ibrary/” then those are always relative to the location of the .gitignore file. That means your current .gitignore file will only work if it is placed inside the project directory (next to the Library, Asset, Temp, etc. folders). You could also delete the starting “/” character from your folder paths. The result will be that git will ignore any Library folder anywhere in your repository.