Almost two years after I created a pull request to include a default TwinCAT 3 .gitignore file into the official GitHub Gitignore repository, it has finally been accepted & merged into main branch. Download the file here.
You better not be in a hurry to propose changes! 😅