
Generate ‘.gitignore’ for Delphi, FreePascal, and other languages easily
Every version control system implements a concept to ignore files with a certain file extension to be included. In Git, you add a file named .gitignore to your directory that is to be added to version control. Each line in this file lists a filename, a wildcard expression, or a (highly simplified) regular expression. If a file matches any of the criteria, it will be ignored. Thus, the name “Git ignore”.
From working with other developers, I know for a fact that this file is used as a reason not to use a version control system. “Oh, all the files were added. I have no real control over the whole thing. We switched back to using ZIP archives with dates in the filename. Same result.”
Yes, really, that was the train of thought.
So, instead of collaborating with other developers or other open-source projects that already have a .gitignore file for the language or IDE they require, the solution is to drop versioning as it is not showing immediate advantages. I have never understood this reasoning, because I cannot tell you how many times a version control system literally saved me from doing the same work again because I have been careless. And that is only one of the many advantages!
Gitignore.io might be the savior for you.
Simply type in one or more operating system, language, or IDE and the Git Ignore file will be generated for you. The keywords Delphi and FreePascal are both supported.
So, there it is. No longer a reason to ditch looking at Git because of the difficulty to exclude files that are not to be versioned…
Also don’t forget the .gitattributes file. Many people still don’t know this and you almost always get some of those funky situations where you have some bad LF only line endings in their source files.