0

If I simply turn off and on the Unity project, git asks me to commit the file below.

Library\ArtifactDB
Library/CurrentLayout-default.dwlt
Library/SourceAssetDB

Is this a normal situation?

I added the git ignore file and it is as below.

# This .gitignore file should be placed at the root of your Unity project directory
#
# Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore
#
[Ll]ibrary/
[Tt]emp/
[Oo]bj/
[Bb]uild/
[Bb]uilds/
[Ll]ogs/
[Mm]emoryCaptures/

# Asset meta data should only be ignored when the corresponding asset is also ignored
!/[Aa]ssets/**/*.meta

# 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
*.unitypackage

# Crashlytics generated file
crashlytics-build.properties

As I changed the structure of the folder,

I tried to remove '/' from the front and add '**/', but I don't think it's a problem.

ex) /[Ll]ibrary/, **/[Ll]ibrary/

Is there anyone who knows?

P.S. I'm not a native speaker, so my words can be awkward. I'm sorry.

noobdam
  • 17
  • 3
  • Did you add the `.gitignore` file to your index (`git add`), because IIRC if it is not a tracked file, git will not take it's content into account. – Irwene Oct 19 '22 at 07:51
  • As you say, it seems to be an index problem. git rm -r --cached . && git add . && git commit -am "Remove ignored files" this is work thank you – noobdam Oct 19 '22 at 08:05

0 Answers0