The perfect .gitignore

Hello, I just started using cocos2d-x and wanted to develop a game with a friend. We are going to use github to collaborate and can’t seem to find a .gitignore file that covers all the unnecessary files.

The project is to be deployed in iOS, Android and WP8 and we’ll be developing in C++

Was wondering if someone could share what .gitignore files you use for your projects :blush:

Cheers!

#xcode specific
build/*
*.pbxuser
*.mode2v3
*.mode1v3
*.perspective
*.perspectivev3
*~.nib

#ignore private workspace stuff added by Xcode4
xcuserdata
project.xcworkspace

## generic files to ignore
*~
*.lock
*.DS_Store
*.swp
*.out

# Compiled Object files
*.slo
*.lo
*.o
*.obj

# Compiled Dynamic libraries
*.so
*.dylib
*.dll

# Fortran module files
*.mod

# Compiled Static libraries
*.lai
*.la
*.a
*.lib

# Executables
*.exe
*.out
*.app
1 Like

Here is mine: https://github.com/FenneX/FenneX/blob/master/.gitignore

It includes even more things than @slackmoehrle, some of which may or may not be useful for you, and some dependant on my project structure.

You’ll probably want to understand what it means, since you might want to customize it: for example, add some libraries, but not all, and ignore some folders entirely instead of extensions.

1 Like

Thank you both for the answers! It was very helpfull :smiley:

The only thing that you really need in source control are the files and assets that you create, all of the other resources can be generated cocos new ... / sdkbox install .... I’d recommend only keeping:

Classes
Resources
README.md // Steps to install dependencies

Is there anything else that would be useful to have in source control?