Corona projects and GIT

Hello all,

I am new to corona. I just started working on my first project. I like to keep my projects in a version control system. My preferred one is is GIT. Usually you don’t include all the files in a version control system (e.g. files generated by building the project). Does anyone have a list of files that I can ignore (.gitignore) when adding files to the repo?

Many thanks.

Hi @ammar71 and welcome to the Corona Labs community forums.

Normally with Corona, your project folder should not be used to output your builds to. You should build to a different folder. This prevents any temporary build files being added to your project.

If you follow this practice, there won’t be any files you need to add to .gitignore.

Rob

@ammar71:

Rob is correct that in theory you should not need to gitignore any of your project files. That said, depending on how you organize your projects, there might be cases where you would want to add some files to .gitignore. As an example, here are the standard files I exclude from my Corona git repos by default:

work_files/
.CoronaLiveBuild
.DS_Store
Thumbs.db
punch_list.md

Some of those are specific to me (I always keep a “work_files” folder for files that aren’t directly utilized in the app, as well as a markdown file for my working “punch list”). But I also exclude some MacOS-generated cruft and the file that gets temporarily created by Corona while you are running a live build server.

Important to note that most files you would exclude from your repo may also be ones you want to exclude from builds using the excludedFiles table in your build.settings. See: https://docs.coronalabs.com/guide/distribution/buildSettings/index.html#excludingfiles

Apologies for the poor formatting of this post, I’m writing this on my iPhone. Welcome to Corona!

@Rob & @schroederapps

Thanks to both. 

Hi @ammar71 and welcome to the Corona Labs community forums.

Normally with Corona, your project folder should not be used to output your builds to. You should build to a different folder. This prevents any temporary build files being added to your project.

If you follow this practice, there won’t be any files you need to add to .gitignore.

Rob

@ammar71:

Rob is correct that in theory you should not need to gitignore any of your project files. That said, depending on how you organize your projects, there might be cases where you would want to add some files to .gitignore. As an example, here are the standard files I exclude from my Corona git repos by default:

work_files/
.CoronaLiveBuild
.DS_Store
Thumbs.db
punch_list.md

Some of those are specific to me (I always keep a “work_files” folder for files that aren’t directly utilized in the app, as well as a markdown file for my working “punch list”). But I also exclude some MacOS-generated cruft and the file that gets temporarily created by Corona while you are running a live build server.

Important to note that most files you would exclude from your repo may also be ones you want to exclude from builds using the excludedFiles table in your build.settings. See: https://docs.coronalabs.com/guide/distribution/buildSettings/index.html#excludingfiles

Apologies for the poor formatting of this post, I’m writing this on my iPhone. Welcome to Corona!

@Rob & @schroederapps

Thanks to both.