Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Here's an example with a Flash project, but I'm sure a lot of projects are like this.

Suppose I create an image with Photoshop. I then export this image as a jpeg for integration in Flash. I compile the fla as an asset library, which is then used in my Flash Builder project to produce the final swf.

So it goes like :

psd => jpg -> fla => swc -> Flash Builder project => swf.

=> : produce
-> : is used in

The psd, fla, and Flash Builder Project are source files : they are not the result of some process.

The jpg and swc are what I would call "intermediate" files. They are the product of one (or more) source file(s) that are used as input in another tool or process.

The swf is the final result.

So, would you keep those intermediate files under version control? How do you deal with them?

share|improve this question

JPG - do keep under version control, unless you have an automated process for the JPG export from PSD, not all exports are created equal, they are done by hand and a trained eye is used to optimize the tradeoff between compression and visual degradation.

SWF - no need to keep under version control since the same build file produces the same result every time. But, do keep it for convenience if you have team members (project managers, testers) who don't have the software to build the project but do have access to VC and want to see the result.

SWC - similar to the SWF, no need to keep, unless for some reason the developers that use it to build SWFs don't also build the SWC themselves. (Same principle as JARs in Java, those that you do not build yourself, are often checked into VC, if not using a repository-based build tool like Maven that pulls them automatically.)

share|improve this answer
Good point about the JPG compression. – subb Feb 25 '11 at 21:29
I think he intends to keep the SWF in any case, as it is the final target. It's the intermediate SWC he is asking about. – Orbling Feb 26 '11 at 0:09
@Orbling - thanks. My fault for not reading correctly. – NickC Feb 26 '11 at 0:28
In web development, all active files, by which I mean that which makes up the active content of the website (not including auto-generated content) tends to be kept in version control. So that there is always a live copy of the whole site stored. So the usual build rules about not storing build targets (as opposed to intermediaries) tend not to be applied. Particularly for proprietary stuff like SWF files. – Orbling Feb 26 '11 at 0:35
I may publish websites for clients, but do not typically have a license for the software to build SWF files on the devices I publish websites from. In those cases I need the flash content artists to commit the final output to revision control. – shannon Sep 5 '12 at 15:19

I typically keep my intermediate files in a folder called "raw" under my images folder and check them in to source control. I sort of treat them like my "source code" of images. That way if I have to go back and edit some of the imagery, I don't have to find the resources again, or deal with a scaled image that won't handle anymore tweaking.

In your case, keeping the PSD file would most likely be sufficient, since the exports to JPG/FLA/SWC are simple type conversions and can be reproduced quickly.

Having the "raw" designation makes it easy to track in source control and exclude from any deployment scripts.

share|improve this answer
Is your PSD to JPG/PNG conversion automated, or does every developer need to manually generate the JPG/PNG files themselves? If you're working alone that's fine, just asking. – Jeremy Heiler Feb 25 '11 at 21:26
It's a manual process. Most of the time it is just me for a given project, but Photoshop is one of those "standard" apps in our shop, so if somebody else had to tweak the image, they'd have Photoshop on their system too. – Dillie-O Feb 25 '11 at 21:39

Generally, built files should stay out of version control. Obj files are typically kept out of version control, and they are intermediate files produced when building executables.

If your jpgs and swcs are generated automatically as part of a build, keep them out of source control, and have them generated automatically once you build a fresh check out, and think of them like object files.

Things that are modified/updated by hand should be versioned. Things modified/updated by machine should not. (Generally)

share|improve this answer
I agree. That is the ideal scenario. However, in some case, it's not possible to generate output files automatically, because they require human intervention (ex. jpeg compression) or the sources are in a proprietary format or else. – subb Feb 25 '11 at 22:33

I don't. As long as something is done automatically it should be done automatically and it is no point in wasting space in vc - it will only make merges harder.

On the other hand there may be files that are generated and non-automatically tweaked (as JPG example). Then I would keep both source and generated file UNLESS I had an option to keep the source file and parameters tweak (compression level etc.).

share|improve this answer
Parameters tweak as source file. Interesting. – subb Feb 26 '11 at 4:57

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.