Using mercurial to control web design versions (image processing)

I am very new to version control, and I was interested to know if I can get tips on how it can fit into the site design.

I am currently working on a typical, simple website that includes images:

  • Multiple .html and .css files
  • One folder full of photos
  • Another folder with corresponding thumbnails

Can I just put the whole batch in the repository? Or is there a better way to apply version control to it? How do I handle images?

change

How well will it work with image changes? What if I decide to try to optimize my photos or resize them. I won’t be able to see what exactly has changed regarding the images, if there are enough comments to track this?

+7
dvcs mercurial
source share
2 answers

One common practice is to decide which files you will need to publish on the site, and then include these files in your DVCS. If you eventually accept the build / continuous integration server, it will check your code from your repository, run tests on it, compile it, and publish it to the test / production server. To do this, you will need to specify all the necessary files.

You should not include unnecessary files that can change often, but do not mean anything. For the ASP.NET world, they include .suo, .user, resharper files. If you have a folder with downloaded files, you can exclude this, so the files you are testing are not included. Basically, something like that.

Explanation

Regarding the uploaded files folder. If the site supports user uploading of files, and they are stored inside the site’s directory, say, in the “Uploads” folder, you would like to exclude such a folder from the source control. This is just an example of what you would not want to include. During testing, you would check the upload of files to your site, but you certainly would not want these test downloads to be published for production, so do not use them for version control.

+3
source share

Unless you have a good reason, I don’t understand why you couldn’t put the images in the repository.

+1
source share

All Articles