Reputation: 187
I asked a similar question the other day, but i think this is different enough to make it worth another question
I am currently using BitBucket and Source tree with my project, here is my git ignore.
My issue is that when I switch PC and pull as soon as i open the project, without doing anything it gives me about 1000 meta files to commit and a project settings file and a c sharp assembly file, surely this cant be right. Thoughts?
I do have force text enabled and i do have meta files visible.
Thanks Everyone.
EDIT
Here is a snapshot of the meta files.
Upvotes: 0
Views: 1480
Reputation: 951
As I posted in the comment above:
If your gitignore has /Library/
, it is not going to ignore Not a Nightmare/Library/
and its contained files. You could try removing the leading slash, but I suggest restructuring your project so that your Unity project is the root.
Example:
I hope that helps!
Upvotes: 0
Reputation: 19025
My guess is that these files are indeed in your repository (perhaps they were added before you updated your .gitignore
), that they contain CRLF
line endings, and that on your new PC git core.autocrlf
returns true
. If that is indeed the case, then git plans to convert all those CRLF
s into LF
s, and thus considers your local copy "different" than what is in the repo. Try setting core.autocrlf
to false to stop git from doing that. If that fixes it, a good idea would be to add the following to your .gitattributes
file:
* -text
That will disable such end of line processing no matter what machine the repo is on in the future.
Upvotes: 2