Cocos2d-x – Avoiding entire SDK on Git



Cocos2d-x has been one of the most accepted engine among mobile game developers. Aside its huge amount of nice features, there’s some drawback. In this post, I will focus on the project side.

When you create any project using the cocos command, it copies the entire SDK into project folder. It isn’t bad at all, but the point is the Cocos2d-x SDK (3.11.1) is about 390MB. When you have lots of projects using Cocos2d-x it can be a problem.

So, the easiest way I found out to bypass this issue is putting “cocos2d” folder, located in your main repository, inside the “.gitignore” file.

If you use multiple workstations, you can just create one test project and copy the cocos2d folder into your repository again. Works like a charm.


That’s it.