Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
672 views
in Technique[技术] by (71.8m points)

git - Source Tree Unity project Ghost files

Recently changed my Gitignore which was fine until i pulled down on another machine to find some of the project was not there. So i have switched back to my old git ignore but now as soon as i open the project and go to source tree these files and folders need pushing every time.

enter image description here

I do not edit these files and every commit they come up. Then even though i have hidden meta files selected in the settings whenever i make any change, it makes me commit a load of meta files.

Any ideas to fix both these issues.

Here is my git ignore.

# =============== #
# Unity generated #
# =============== #
[Tt]emp/
[Oo]bj/
[Bb]uild
[Ll]ibrary/
sysinfo.txt
*.stackdump

# ===================================== #
# Visual Studio / MonoDevelop generated #
# ===================================== #
[Ee]xported[Oo]bj/
.vs/
/*.userprefs
/*.csproj
/*.pidb
/*.suo
/*.sln*
/*.user
/*.unityproj
/*.booproj

# ============ #
# OS generated #
# ============ #
.DS_Store*
._*
.Spotlight-V100
.Trashes
Icon?
ehthumbs.db
[Tt]humbs.db
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

This is a zillion-times duplicate question but,

1) git is for source control. "source" means small text files (ASCII files), being computer languages.

You don't use git, at all, for things like filmmaking, game production, in a music studio, the TV business, etc.

The game industry generally runs on subversion.

(Unity projects have four or five tiny "source" files, and then gigabytes of video, animation, textures, models etc. It's just totally unsuitable for git.)

2) If for some reason you are trying to use git with a Unity project. FYI the usual suggestion,

simply use the actual up-to-the-minute official plan FROM GIT THEMSELVES:

https://github.com/github/gitignore/blob/master/Unity.gitignore

Hooray!

You often see long-winded discussions about "how to use git with Unity", this is bizarre as (the best you can do with git) is right there, courtesy git git.

Just to repeat, do note that it is incredibly easier to use svn with Unity. svn is made for media, film, game etc projects. Git is really for source (i.e. computer code files). Unity projects have a few hundred bytes computer code ASCII files, and very often 100s of gigabytes of music, video, texture, modelling etc assets. You're knocking yourself out using git for no reason.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...