- With cocos command create a new project. You can make the project oriented portrait with –portrait , if not specified, landscape mode is the default orientation.
$ cocos new <project_name> -l cpp -p <backward.domain.name> -d ~/tmp [--portrait]
- Move to the project directory and initialize git repository
$ git init
- Add files and commit as a new change
$ git add .
$ git commit -m "initial project files"
- Create a remote repository (bitbucket.org)
- Set the remote repository url
$ git remote add origin https://<user>@bitbucket.org/<user>/<repo>.git
$ git remote -v
- Push current change to remote repository and upstream branch
$ git push -u origin master
- Add .gitignore file as: permalink
- Set auto-incremental build number for iOS as: permalink
- Set auto-incremental build number for Android as: permalink
- Inhibit all warnings from cocos2d as: permalink
- To reduce compilation time, build a fat static library of cocos2d-x: permalink