Skip to content

Creating a new application

Aaron James Long edited this page Mar 20, 2020 · 6 revisions

Wiki >Creating a new application

Application repositories

This section details the development and maintenance of application repositories.

Creating a new application repository

Each application requires a repository. The following steps will create a repository using the latest TwinCAT base code with a vendor branch (used to maintain base code versions) and an application specific master branch (used to branch off for application development).

Create a bare repository

To begin with create a new bare repository in the ISIS Motion Control organisation Github by:

  1. Clicking the green New button in the top right
  2. Enter an <application name> (such as MCU_001)
  3. Enter a description
  4. Do NOT include a README.md, .gitignore, or, license

Prepare a local repository with the latest base code

We now need to get the latest collaboration base code and use this as the starting point for our application. Using a git terminal (in the directory of your choice):

  1. Create and enter the application folder
mkdir <Application name>
cd <Application name>
  1. Initialise the repository and pull the latest base code (Using your bit bucket user name)
git init
git remote add vendor https://<USER NAME>@bitbucket.org/europeanspallationsource/tc_generic_structure.git
git fetch vendor
  1. Push the latest code to the application repository under a vendor branch
git checkout -b vendor_branch vendor/master
git remote add origin  https://github.com/ISIS-Motion-Control/<Application name>.git
git push origin vendor_branch
  1. Create a master branch for the application and push this to the application repository
git checkout master
git push origin

Change the default repository branch

The newly created application repository will have the vendor_branch as it's default branch. Change this to master by:

  1. Select the application repository on the ISIS Motion Control organisation page
  2. Click Settings->Branches and select master as the default branch

This is done so that application development will branch from the master branch, and vendor is used to keep external code (in this case the TwinCAT base code) up to date.

Clone this wiki locally