PLC Source Control - Adding a Repository

Auteur avatarGareth Green | Dernière modification 9/05/2022 par Gareth Green en cours de rédaction

Introduction

Branching is a means of diverging from your main line of development and allows you to continue to do work without affecting the main line of code.

This is used when you want to try out or develop some alternative code but want to have the ability to switch back to the original code if necessary.

These instructions give details of how you create a branch within the Beckhoff TwinCAT Xae Shell program.

These instructions start from a point where the project has been created and PLC code has been loaded in to the TwinCAT Xae Shell program,

Étape 1 - Open Team Explorer

Select View

From the Drop-down menu select Team Explorer



Étape 2 - Manage Connections

Select Connections Icon



Étape 3 - Add Repository

1 Select the Add Option

2. Enter the path of the source folder for your project

3. Press Add button to add the repository



Étape 4 - Select Repository

he Repository has been added

1. Select Connections Icon by

selecting the red square to show the project.



Étape 5 - Team Explorer Home Screen

This is the main screen for the version control commands



Étape 6 - Branches

Select the Branches option



Étape 7 - Branches Detail

This panel now shows the Branches Available

  1. The master branch this is the main copy of the program in the local folders.
  2. The remote/origin this is the remote repository



Étape 8 - Creating a Branch

1.Select New Branch

2. Enter the Branch Name, this example shows "TimerMod"

3. (Indicates where the branch is attached)

4.Press Create Branch



Étape 9 - Selecting the New Branch

In this example TimerMod is the new branch. It is shown in bold text to indicate that it is selected (checked out). To change to a different branch , click on the branch name. Generally modifications to code will be made on local branches not the remotes /origin.

If you are unable to switch branches , it is most likely that there are changes that have not been committed .



Commentaires

Draft