jonny
(Jonny)
March 6, 2017, 7:24pm
1
I’m not sure on the answer to this. Every now and then I see a load of assets files + folders being added to my git commit. Should I just gitignore the whole ‘assets’ folder?
I know you used to be able to delete all the assets in Yii 1 and it would just regenerate them.
1 Like
patrickm
(Yiiframework)
March 7, 2017, 12:31pm
2
Yes - but only web/assets, not the one in your project root.
jonny
(Jonny)
March 7, 2017, 1:38pm
3
Ok, I don’t understand though why the root/assets folder just continually gets more and more sub folders added to it??
patrickm
(Yiiframework)
March 7, 2017, 1:55pm
4
It shouldn’t. Can you show us what folders get created in there?
jonny
(Jonny)
March 7, 2017, 2:47pm
5
projectroot/assets
2ca9fb63
3f21efd7
4db100cb
…
There’s about 30 folders all named with a hash.
jacmoe
(Jacob Moen)
March 7, 2017, 3:17pm
6
You can safely add that directory to the .gitignore.
Before you do that, though, delete the directory (to wastebin) and check in git. You might need to commit the removal of the ‘assets’ directory.
2 Likes
jonny
(Jonny)
March 7, 2017, 3:22pm
7
jacmoe:
You can safely add that directory to the .gitignore.
Before you do that, though, delete the directory (to wastebin) and check in git. You might need to commit the removal of the ‘assets’ directory.
Thanks, I assumed this was the case, but I wanted to double check