Git for TwinCAT 2 (CoDeSys)
GoTwinCAT
: Git Macro for CoDeSys or TwinCAT 2. // Oct 2019
It is a good idea to close
PLC Control
before using+commit.cmd
%ProjectDir%
.exp
files from the one .pro
file to the ~%ProjectName%
folderFrom command line, execute
git branch
orgit checkout
before running+restore.cmd
%ProjectDir%
.
├─ .git
│ └─ ...
├─ .gitignore
├─ +commit.cmd
├─ +restore.cmd
├─ Git.mac
├─ README.md
└─ src
├─ foo.pro
├─ bar.pro
├─ bar.tpy
├─ ~foo
│ ├─ FILE111.EXP
│ ├─ FILE222.EXP
│ └─ ...
└─ ~bar
├─ FILE111.EXP
├─ FILE222.EXP
└─ ...
Open options menu in the PLC Control
then add Git.mac as a macrolibrary to the working project: Project → Options → Macros → Macrolibrary... → Include...
After that, you can find it under the Edit → Macros → Git → Commit
menu items
“When TwinCAT PLC Control is started, you can add commands in the command line which will be asserted during execution of the program.” Read the rest at the infosys’ topic: Command Line/Command File Commands