1

I'm using SpriteBuilder to publish cocos2d V3 project. And share the project file over SourceTree and BitBucket.

Almost Every files are synchronized except for Published-iOS file.

It all solved after sending the missing file to my team crew and he put it into place.

But it requires extra work for each push.

Does anyone know how to fix it?

ika_tarou
  • 13
  • 3
  • generated/postprocessed files do not belong under source control, it would quickly bloat your repository not just because of the file sizes but also the frequent changes made to these files. Plus the state of the project depends on who last published and committed the generated files, which when merged can leave the project in an undefined state. Please reconsider because what you're trying to do goes against best practices. Your team simply ought to open the sb project and hit publish once after pulling the latest changes. – CodeSmile Nov 09 '14 at 10:27

1 Answers1

2

It is possible that this file (or here folder) has been put in a .gitignore.
That is the case since issue 482.

See for example "What goes in SpriteBuilder .gitignore for a project?".
That folder is also ignored in this thread.

If you were to remove it from said .gitignore, then you would be able to add it and commit it locally, which means the sync would work.
Or if you are interested in just one file within that folder, you could:

  • keep Published-iOS/ in the .gitignore
  • git add -f Published-iOS/aFile (to force adding an ignored file to the index)
  • commit and sync that file.

As LearnCocos2D commented, adding the full folder isn't a good idea/practice.
That is why I suggested to add only one file within that folder (if you absolutely need it), instead of the folder itself.

Yet, the OP ika-tarou confirmed:

There sure was "Source/Resources/Published-iOS" written in .gitignore!

After remove it and push again the receiver got a lot of errors when merged because of the missing files I sent before. So he removed those files and merged again. Then succeeded.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250