{"id":20526557,"url":"https://github.com/nikvoronin/tc2_git","last_synced_at":"2025-04-14T04:20:34.976Z","repository":{"id":144197556,"uuid":"214238404","full_name":"nikvoronin/Tc2_Git","owner":"nikvoronin","description":"Git for TwinCAT 2 (CoDeSys)","archived":false,"fork":false,"pushed_at":"2024-01-15T14:03:36.000Z","size":11,"stargazers_count":16,"open_issues_count":0,"forks_count":10,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T18:12:23.368Z","etag":null,"topics":["beckhoff","beckhoff-twincat-plc","codesys","git","industrial-automation","plc","plc-programming","source-control","twincat","twincat2","windows"],"latest_commit_sha":null,"homepage":null,"language":"Batchfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nikvoronin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-10-10T16:58:14.000Z","updated_at":"2025-03-04T09:13:51.000Z","dependencies_parsed_at":"2023-06-16T07:30:53.513Z","dependency_job_id":null,"html_url":"https://github.com/nikvoronin/Tc2_Git","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikvoronin%2FTc2_Git","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikvoronin%2FTc2_Git/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikvoronin%2FTc2_Git/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikvoronin%2FTc2_Git/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nikvoronin","download_url":"https://codeload.github.com/nikvoronin/Tc2_Git/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248819633,"owners_count":21166512,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["beckhoff","beckhoff-twincat-plc","codesys","git","industrial-automation","plc","plc-programming","source-control","twincat","twincat2","windows"],"created_at":"2024-11-15T23:14:43.661Z","updated_at":"2025-04-14T04:20:34.955Z","avatar_url":"https://github.com/nikvoronin.png","language":"Batchfile","readme":"# Git for TwinCAT 2 (CoDeSys)\n\n`GoTwinCAT`: [Git Macro for CoDeSys or TwinCAT 2](https://gotwincat.blogspot.com/2019/10/git-twincat2-codesys-project-macro-export-import.html). _// Oct 2019_\n\n## How To...\n\n\u003e It is a good idea to close `PLC Control` before using `+commit.cmd`\n\n* [+commit.cmd](https://github.com/nikvoronin/Tc2_Git/blob/master/%2Bcommit.cmd) does:\n  1. looking for the .pro files inside `%ProjectDir%`\n  2. exports several `.exp` files from the one `.pro` file to the `~%ProjectName%` folder\n  3. git add * (all)\n  4. git commit -m _with-current-date-n-time_\n\n\u003e From command line, execute `git branch` or `git checkout` before running `+restore.cmd`\n\n* [+restore.cmd](https://github.com/nikvoronin/Tc2_Git/blob/master/%2Brestore.cmd) does:\n  1. looking for .pro files inside `%ProjectDir%`\n  1. import from the .exp files to the .pro one\n\n## Project Structure\n\n```\n.\n├─ .git\n│  └─ ...\n├─ .gitignore\n├─ +commit.cmd\n├─ +restore.cmd\n├─ Git.mac\n├─ README.md\n└─ src\n   ├─ foo.pro\n   ├─ bar.pro\n   ├─ bar.tpy\n   ├─ ~foo\n   │  ├─ FILE111.EXP\n   │  ├─ FILE222.EXP\n   │  └─ ...\n   └─ ~bar\n      ├─ FILE111.EXP\n      ├─ FILE222.EXP\n      └─ ...\n```\n\n## Macro\n\nOpen options menu in the `PLC Control` then add [Git.mac](https://github.com/nikvoronin/Tc2_Git/blob/master/Git.mac) as a macrolibrary to the working project: `Project → Options → Macros → Macrolibrary... → Include...`\n\n![00_macro](https://user-images.githubusercontent.com/11328666/66593447-b295cd00-eb9f-11e9-9c52-5343585a19a1.png)\n\nAfter that, you can find it under the `Edit → Macros → Git → Commit` menu items\n\n![01_macro_menu](https://user-images.githubusercontent.com/11328666/66593496-cb05e780-eb9f-11e9-80ed-ebdeeacb4cb0.png)\n\n## PLC-Control Command Line\n\n\"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](https://infosys.beckhoff.com/content/1033/tcplccontrol/html/tcplcctrl_addcommandline.htm)\n\n## Understanding Git Series\n\n* [Data Model](https://medium.com/hackernoon/https-medium-com-zspajich-understanding-git-data-model-95eb16cc99f5)\n* [Branching](https://medium.com/hackernoon/understanding-git-branching-2662f5882f9)\n* [Index](https://medium.com/hackernoon/understanding-git-index-4821a0765cf)\n* [Git Reset 101](https://medium.com/hackernoon/reset-101-ba05d9e3f2c7)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikvoronin%2Ftc2_git","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnikvoronin%2Ftc2_git","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikvoronin%2Ftc2_git/lists"}