Well I’ve used git for the first time with unity and idk what happened, when I opened unity this morning I saw all my scripts has a duplicate. Idk how or what happened. I had to manually delete them all. I would love to know was it a bad practice that led to this or is it actually a bug. Please let me know if you need more information.
Almost certainly bad practice. What exactly were the steps you took with git?
So idk what I did but I had multiple references to my local branches in the refs and logs folder (removing them saved the issues). I guess I messed up the order of checkout and pull commands. It’d be nice to know some best practices while using git with unity.
The good news with git is that you didn’t need to manually do the cleanup: git can do that for you:
git clean -df
git reset --hard origin/master
Here’s an excellent guide to setting up your project properly for git: How to Git with Unity
I also suggest going through a git basics tutorial at least once: git - the simple guide - no deep shit!
Thanks a lot. And what all kinds of files should I include under gitignore?
https://thoughtbot.com/blog/how-to-git-with-unity has all the answers you need (see section 1 specifically for gitignore)
Sure I’ll check it out rn. Thanks a lot man