With Git Clone, a new CODESYS project is created, which is version-managed in Git. As a result, cloning a remote repository creates the new project storage (the new working directory with the Git repository).
Requirement: CODESYS Git is installed. You have access to a remote repository.
-
Open CODESYS Git. Click the Git → Clone Git Repository command. It is available when no CODESYS project is open. The “Git Clone” dialog opens.
-
In “Source URL”, specify the URL or file path of the remote repository to be cloned (example: D:\git_remotes\remote1).
In “Git storage path”, specify the empty file directory intended for the new Git project storage (new Git repository) (example: D:\git_local\rep1).
In “Project file”, specify a project directory where the new CODESYS project should be saved in addition to and outside of Git (!) (example: D:\git_projects\myproj1.project, double data management!).
In “Project file type”, select whether it should be a standard project or a library project. Confirm the dialog.
If there is no global configuration file .gitconfig in the local user directory (example: C:\Users\m.muster), then a dialog prompt will open for you to create a basic configuration for all CODESYS Git actions. See the instructions above for initializing a Git project.
If the Git option “Accept self signed certificate” is not selected, then CODESYS Git first checks the certificate for the connection to the server from which the project should be cloned . If the certificate is not trusted, then you will be given the option of allowing the connection after a personal check. The new project is opened. The new working directory is created and automatically initialized as the Git repository. It first has the exact status of the remote repository when the cloning occurred.
-
In the CODESYS project, click the Git → Git Branches command. In the “Git Branches” view, the remote branches are already visible. By default, for the remote "master" branch, a local "master" branch is also created, which tracks the remote branch. Now you can start working in this local branch immediately. In addition, a link (tracking) of the local branch to the "representative" remote branch (origin/master) of the new Git repository is already established.