design version control (dealing with images)
I'm very new to Version Control, and I was wondering if I could get some advice on how it can fit into website design.
At the moment I'm working on a typical, simple website that includes images:
.html
files and a .css
file Can I just put the whole lot in a repository? Or is there a better way I could apply Version Control to it? How should I deal with the images?
edit:
How well will it work with changes to the images? What if I decide to try and optimise my photographs or resize them. I wont be able to see what exactly changed about the images, should comments be enough to keep track of that?
One common practice is to decide what files you would need to publish the site, then include those files in your DVCS. If you eventually adopt a build server/continuous integration server, it will check out your code from your repository, run tests on it, compile it, then publish it to your testing/production server. To do that, you'll need to include all necessary files.
You should not include unnecessary files that may change often, but signify nothing. For the ASP.NET world, those include .suo, .user, resharper files. If you have an uploaded files folder, you could excluded that as well so files that you test upload don't get included. Basically, anything of that nature.
Clarification
Regarding the "uploaded files folder" thing. If you site supports user's uploading files and they are stored inside the site's directory, say in a folder called "Uploads", then you would want to exclude such a folder from the source control. This is just an example of the kind of thing you wouldn't want to include. While testing, you would test uploading files to your site, but you certainly wouldn't want those test uploads published to production, so keep them out of source control.
除非你有一个令人信服的理由,否则我不明白为什么你不能将图像放入存储库。
链接地址: http://www.djcxy.com/p/45552.html上一篇: 如何在Lucene 3.0.1中索引BigDecimal值
下一篇: 设计版本控制(处理图像)