In my Plastic SCM repository, how can I make use of existing well-crafted .gitignore files (such as the ones on GitHub)? I'm looking for an automated conversion from .gitignore to the ignore.conf format that Plastic SCM understands.
There's an old request for such a conversion tool, or even for Plastic SCM to read .gitignore files directly. I don't see either having been implemented yet.
Also, the format of ignore.conf is not systematically documented like .gitignore is. The best documentation I found is this blog post. Apparently comments, exception rules, and wildcards work in the same way as in .gitignore.
Differences I have noticed between ignore.conf and .gitignore:
- Plastic doesn't seem to understand Git's range syntax
[abc]
. - Trailing slash in Git matches only folders, not files or symbolic links. Without a trailing slash the name can match file and folder alike. In Plastic there seems to be no way to tell a file from a folder.
- In Git,
folder/
with a trailing slash ignores the folder and all files under it. In Plastic, it will only ignore the files under it. - There's a peculiarity with folders that begin with a dot. In Git,
.vs/
ignores the folder and its contents (and you could alternatively use.vs
which would also match a regular file by that name). In Plastic, you need both.vs
to ignore the folder and.vs/
to ignore its contents.