Is a PLCnext Project, friendly with GIT? Can you easily use GIT for version control? Also is there a Compare/Merge tool that you can use with GIT?
Hello, You can save project as uncompressed (*.pcwex) - it consists of a lot of text files - and add it to your source control system.
We have several projects in Git (gitlab), but we encounter many issues with handling the project structure in Git. For example, creating a new FB generates 2/3 new files and somehow these are not picked up by git (when running ‘git add *’), resulting in a loss of work plus it makes the projectfile become corrupted.
hello MM,
I think that Dzmitry means the flat file system “*.pcwef” (not .pxwex)
Please remember that the project has to be saved for the changes to become permanent …
What PLCnext Engineer Version are you using?
I can not notice any missing files:
Example Creating new FB and adding to a Program
git status
git status
On branch master
Changes not staged for commit:
(use "git add ..." to update what will be committed) (use "git checkout -- ..." to discard changes in working directory)
modified: LLDP_2020.3_testFlat/content/NewProgram.pou~Code~0000.ld
modified: LLDP_2020.3_testFlat/content/NewProgram~Variables~0000.var
modified: LLDP_2020.3_testFlat/content/PROJECT~PROJECT~0000.proj
modified: LLDP_2020.3_testFlat/structure.xml
Untracked files: (use "git add ..." to include in what will be committed)
LLDP_2020.3_testFlat/content/NewFunctionBloc~Code~0002.ld
LLDP_2020.3_testFlat/content/NewFunctionBlo~Code1~0000.st
LLDP_2020.3_testFlat/content/NewFunction~Metadata~0002.meta
LLDP_2020.3_testFlat/content/NewFunctio~Variables~0002.var
LLDP_2020.3_testFlat/content/NewFuncti~Descriptio~0002.html
LLDP_2020.3_testFlat/content/NewFuncti~VersionHis~0002.usermeta`no changes added to commit (use “git add” and/or “git commit -a”)
`------
$ git add *
$ git status
On branch master
Changes to be committed:
(use “git reset HEAD …” to unstage)
new file: LLDP_2020.3_testFlat/content/NewFunctionBloc~Code~0002.ld
new file: LLDP_2020.3_testFlat/content/NewFunctionBlo~Code1~0000.st
new file: LLDP_2020.3_testFlat/content/NewFunction~Metadata~0002.meta
new file: LLDP_2020.3_testFlat/content/NewFunctio~Variables~0002.var
new file: LLDP_2020.3_testFlat/content/NewFuncti~Descriptio~0002.html
new file: LLDP_2020.3_testFlat/content/NewFuncti~VersionHis~0002.usermeta
modified: LLDP_2020.3_testFlat/content/NewProgram.pou~Code~0000.ld
modified: LLDP_2020.3_testFlat/content/NewProgram~Variables~0000.var
modified: LLDP_2020.3_testFlat/content/PROJECT~PROJECT~0000.proj
modified: LLDP_2020.3_testFlat/structure.xml-—
Maybe I am doing something differently?
I was working with 2020.0.1 and we noticed when we created/rewrite functionblocks, when saving, the underlying files were either missing or the structure.xml was corrupted (not updating the name of the file related to the name of the functionblock etc). We have switched to 2020.3 and since then we have not seen a corrupted project. You can understand it is quite frustrating when we need to rebuild a project from a previous commit with the help of the flat files in gitlab (manual work). One thing we did change is use 'git add -a ’ (instead of just plain 'git add ').