PLC Source Control - Working with GIT and TcXaeShell : Différence entre versions

[version en cours de rédaction][version en cours de rédaction]
Ligne 8 : Ligne 8 :
 
}}
 
}}
 
{{Introduction
 
{{Introduction
|Introduction=<translate>These steps outline typical actions that make up a development cycle for changing code on a machine, saving changes locally and to the cloud repository using Git as the Source control tool.</translate>
+
|Introduction=<translate>These steps outline typical actions that make up a development cycle for changing code on a machine, saving changes locally and saving to the cloud repository using Git as the Source control tool.</translate>
 
}}
 
}}
 
{{Materials
 
{{Materials

Version du 5 mai 2022 à 14:33

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

Pas encore d'image

Introduction

These steps outline typical actions that make up a development cycle for changing code on a machine, saving changes locally and saving to the cloud repository using Git as the Source control tool.

Étape 1 - Making a branch

Create a branch locally to hold the code involved with the changes.

See document for Making a Branch


The branch name is made up of three parts:

  1. Machine Reference S095_ followed by an underscore character _
  2. Service Job Number 1234567890_ followed by an underscore character _
  3. Text that identifies the change Infeed, Outfeed, Timer Mod.


There may be more than one branch for changes under the service job. This method of naming aids traceability. For example S095_123454321_ClampMod and S095_123454321_InfeedTiming are two branches under the same job number.



Étape 2 - Saving the changes

  1. The change has been saved as a local change.
  2. Press Sync to save the changes to the cloud repository.



Étape 3 - Pushing changes to the Cloud Repo

  1. Select Push
  2. Message appears showing the successful push to the Origin which is in the remote cloud Repo


2.


Étape 4 - Add More Changes, Commit and Push

  1. Add more changes to the code,
  2. Commit each change as they are completed or as a group of changes. Add the Machine and job number to the Commit Message
  3. Push changes to the remote Repo


This cycle of changing code and pushing to the cloud can be extensive and can cover many hours work. By pushing to the cloud the work is backed up and code can be restored if needed.

Étape 5 - Setting up for Merging the Branched code

  1. View Team Explorer
  2. Select Home then select Branches
  3. Mouse click on master when it is selected it will be in bold text. If this does not work and there is an error message, the most likely cause is there are committed changes waiting to be pushed to the cloud Repo
  4. Press Merge to open the merge window.



Étape 6 - Merge

  1. From the dropdown Menu select the branch to be merged
  2. Keep the option to Commit changes after merging
  3. Press merge



Commentaires

Draft