14

I just updated my Unity from 2017.3.1f1 to 2018.2.1f1 and when I opened my project it moved the manifest.json file from the UnityPackageManager folder to the Packages folder. Also, it created a bunch of files and folders in the Packages folder.

My question is:

Is it safe to ignore the Packages folder from the repository, especially manifest.json?

Thanks.

2 Answers 2

19

manifest.json contains list of your dependencies(the packages you have used for your project). so if You clone your repository on a different machine, unity uses this list to download the required packages.

short answer: You should not put Packages in your .gitignore. It should be committed along with the rest of your project files.

1
  • 3
    just to clarify. then is it fine to add packages folder into gitignore with an exception for manifest.json ? edit i am confused with new packages folder that show up in unity editor containing multiple file that i didnt knoew
    – asem bused
    Commented Mar 19, 2019 at 7:11
6

Not a lot of google results for this, so for future searchers I will add:

It seems in Unity 2020.1 (and probably earlier) that the actual package contents are held in Library/PackageCache, and only the manifest file lives in the root Packages folder.

If Library is ignored as it should be, then there is no additional entry needed in the .gitignore.

Not the answer you're looking for? Browse other questions tagged or ask your own question.