Search code examples
gitmd5gitignore

Gitignoring md5 files


In one of my Git projects, I have files in md5 format that I want to ignore.

I tried to add the following entry to my .gitignore,

[0-9a-f]{32} 

but apparently .gitignore files do not support regexp. Is there an equivalent way to achieve that?


Solution

  • [0-9a-f]{32} does not work,

    but

    [0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]
    

    does (although it is very ugly).