I am looking for .gitignore file for the Lattice Diamond IDE. I've been trying to only add what I need, but it would be nice to have a .gitignore that just ignores all of the automatically generated files for build/documentation/etc. Yes, I could sit down and make one myself, but a ready-made already existing file would be ideal.

The build process that Diamond runs through, plus any IP thats included from their included tools, all generate a lot of files, some necessary, many not. I've not come across a clear definition of what is needed and what is not, nor have I been able to find a boilerplate .gitignore for the IDE.

I debated where to place this question, I apologize if it is off topic here, however electronics SE seemed like a best fit since it involves an FPGA IDE.

EDIT: I would really like an explanation as to why this is being downvoted. If anyone has resources I am missing about what files Diamond generates that are temporary, then by all means please downvote. But I would also appreciate a point in the right direction. I spent a good while searching through Diamond documentation, and would love to be proven as an idiot, so long as it means I get a good answer.

  • \$\begingroup\$ I'm voting to close this question as off-topic because this question is not directly related to electronic design but rather than development tools. \$\endgroup\$ Commented May 22, 2015 at 9:29
  • 1
    \$\begingroup\$ @ChetanBhargava Thats fine, what SE group would you recommend this question would get posted under? \$\endgroup\$ Commented Aug 19, 2015 at 23:12
  • \$\begingroup\$ I did not down vote though :-) \$\endgroup\$ Commented Aug 20, 2015 at 5:14
  • 2
    \$\begingroup\$ This seems like a reasonable question to me, I know I have the same issue with Xilinx and someone maintaining a list of ignores is really helpful. \$\endgroup\$
    – Sam
    Commented Aug 20, 2015 at 16:11

2 Answers 2


It took me a few hours of guess and check to figure out what exactly is needed and what isn't. The project I inherited used the project directory as the implementation directory (where it dumps most of the temporary files). See below with what I came up with. Note that this is by no means complete, there are lots of features to Diamond that I am not using, so there may be other files and folders created that I am not aware of; which is why I was asking for something more complete.

This comes with no warranty, and assumes that the implementation directory matches "impl*/" as is the default setting when creating a new project. If I come up with anything else, I will edit this over time to keep it current.



  • 20200505 - Added additional files that I've found were generated and not needing to be tracked in git as of some recent Diamond releases.

A way to figure out the required files is to use the "File"->"Save Project As..." and to specify a new folder where to save it. It look like Diamond then create a minimum of files while still allow to rebuild all the others files.

Then you can choose if you want to track the GUI setting related files or not.

  • \$\begingroup\$ While not entirely true (I just tried it and it brought along the implementation directory with .html files, made sure "copy generated files" was unchecked), this is a fantastic way to get rid of various generated files. Albeit a little roundabout. \$\endgroup\$ Commented Oct 13, 2016 at 20:56
  • \$\begingroup\$ I also just noticed that, while it does copy over .xcf project files, it misses .ddt Diamond Deployment Tool files. \$\endgroup\$ Commented Oct 13, 2016 at 21:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.