Git and .gitignore
Hi,
As I am browsing the content-folder of a flat project, I notice a lot of files which I suspect temporary and are not necessary for the project in version control/git.
Are there any templates for a .gitignore file I could use to ease the staging of files?
Examples of files I suspect are not needed:
- CE_primary_lo~Source~0006 (no file ending)
- AlarmPage.~Thumbnail~0002 (as well as ...0003 and so forth type of files)
- OPTE9~DataList~0003.dlr4pd (all dlr4pd files seem to be empty)
- ...and generally all files with no file ending.
I might be wrong and the above are important files, but I am hoping there are even more unessential files. Less is more in git :)
Comments
Out of interest, are you using the Version Control feature of PLCnext Engineer?
No, I am using git on the side as I am the only developer on this project.
But now as I come to think about it, it would be beneficial to share some functions/functions block with my colleagues.
The way we did this at my old workplace (where each project was saved in a generic project-file + all the .st files) was to create a git submodule in each repository. This folder contained all files we wanted to be shared across various PLC-repos such as functions, data types and function blocks.
We could do this because our software (Bachmann's Solution Center) didnt care where the files was located. We therefore created dedicated folders for whatever we liked, such as "Submodule Folder/Datatypes, /Functions, /FunctionBlocks and so forth. This became a git submodule which we could handle separately from the PLC project it was located inside. So if my colleauge created a cute function, he would commit it to the submodule, and moments later I could pull it and use it in my project as well.
In PLCnext Engineer all files are piled together in a /content -folder which makes it impossible (i think) to create submodules as they require their own folder inside the repo.
Any update on this, @Martin PLCnext Team ?