Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to deal with files that are relevant to version control, but that frequently change in irrelevant ways?

.dproj files are essential for Delphi projects, so they have to be under version control.

These files are controlled by the IDE and also contain some information that is frequently changed, but totally irrelevant for version control.

For example: I change the start parameters of the application frequently (several times a day), but don't want to accidently commit the project file if only the part dealing with the start parameters has changed.

So how to deal with this situation?

A clean solution would be to take the file apart, but that isn't possible with the Delphi IDE AFAIK.

Can you ignore a specific part of a file?

We're using Subversion at the moment, but may migrate to Git soon.

like image 358
Jens Mühlenhoff Avatar asked Nov 18 '11 09:11

Jens Mühlenhoff


1 Answers

In our case, it's rare for a developer to make a meaningful change to the .bdsproj, .dpr, .res files. So we reject the commit (pre-commit hook in subversion) unless special tags: [add project file] or [add res file] are present in the commit comment. This prevents "frivilous" changes to those files.

like image 111
Chris Thornton Avatar answered Sep 20 '22 00:09

Chris Thornton