Cache Staheli Cache Staheli - 1 year ago 103
Git Question

Unity files not being ignored properly by git

I'm working with Unity in a group, and because of what I've read in several places, we put the following lines into our


# =============== #
# Unity generated #
# =============== #

# ============================================= #
# Visual Studio / MonoDevelop / Rider generated #
# ============================================= #

# ============ #
# OS generated #
# ============ #

When I clone the project, the working directory is clean, but as soon as I open this project in Unity, I see tons of files were marked as changed in
git status
git status

Why are these files being added even though they are in the

Answer Source

Were they by any chance added before you created the .gitignore file?

If so, then remove them:

git rm --cached [file]

After that make a new commit with the changes. That is it, they will be removed and untracked from then on.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download