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.

4 Answers
4

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.)

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.
–
OrblingFeb 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.
–
shannonSep 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.

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 HeilerFeb 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-OFeb 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)

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.
–
subbFeb 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.).