correct git setup for unity project

Hi,

I am setting up git for my unity project with github + sourcetree in OSX.
OSX 10.11.4
Unity 5.3.4f1

I’ve found some link that explains about how to set git correctly with unity but it is not up to date…?

http://stackoverflow.com/questions/18225126/how-to-use-git-for-unity-source-control

I still get below by just opening the unity project which says it has to be staged?? (See the attached image file)

I’m not familiar with the UI you’re showing but I think it’s saying those files are being modified (not that they are new). One thing that can cause this is that editing the .gitignore after you’ve already added files doesn’t stop Git from wanting to commit new versions of those files. So if you created your Git repo, added everything, committed, and then setup the .gitignore, you would see this happening.

You first would have to delete those files from Git before it would start to ignore them. Otherwise the .gitignore shown in those links seems pretty correct and close to what I used for my own projects.

1 Like