Which files should go in git repo?

This may have been answered before, but the search feature didn’t turn it up. A lot of the files in the directory the cocos project tool creates are huge and I’m not sure which ones need to be versioned. Is there a guide on this anywhere? Thanks.

Here’s the root .gitignore template I use for my projects:

# ================
# cocos2d-x
# ================
[Bb]in/
cocosStudio.cfg
cocosStudio.udf

# ================
# c++
# ================

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

# Debug Object files
*.o.d

# Compiled Dynamic libraries
*.so
*.dylib

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

# ================
# Windows crap
# ================

# Windows image file caches
Thumbs.db
ehthumbs.db

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# ================
# Mac crap
# ================

.DS_Store

Hope this helps

*EDIT: Added the.gitignore files I have for platform directories, it’s probably worth looking at the .gitignore that comes along with the cocos2d-x repo too

proj.android/.gitignore

[Aa]ssets
[Bb]in/
[Oo]bj/
[Ll]ibs/
[Gg]en/

#Auto generated file
local.properties

proj.android-studio/.gitignore

.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
/captures

proj.ios_mac/.gitignore

# ================
# Xcode
# ================
.DS_Store
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
*.xcworkspace
!default.xcworkspace
xcuserdata
profile
*.moved-aside
DerivedData
.idea/

proj.win32/.gitignore

#Ignore symlink folders
[Cc]lasses
[Rr]esources
[Ll]ibs

## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.

# User-specific files
*.suo
*.user
*.sln.docstates

# Build results

[Dd]ebug.win32/
[Rr]elease.win32/
[Dd]ebug/
[Rr]elease/
x64/
build/
[Bb]in/
[Oo]bj/

# Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets
!packages/*/build/

# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*

*_i.c
*_p.c
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.log
*.scc

# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf
*.cachefile

# Visual Studio profiler
*.psess
*.vsp
*.vspx

And the .gitattributes for good measure :smiley:

# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto

# Explicitly declare text files you want to always be normalized and converted
# to native line endings on checkout.
*.c text
*.h text

# Declare files that will always have CRLF line endings on checkout.
*.sln text eol=crlf

# Denote all files that are truly binary and should not be modified.
*.png binary
*.jpg binary

# Custom for Visual Studio
*.cs     diff=csharp
*.csproj merge=union
*.vbproj merge=union
*.fsproj merge=union
*.dbproj merge=union

# Standard to msysgit
*.doc	 diff=astextplain
*.DOC	 diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot  diff=astextplain
*.DOT  diff=astextplain
*.pdf  diff=astextplain
*.PDF	 diff=astextplain
*.rtf	 diff=astextplain
*.RTF	 diff=astextplain
2 Likes