-
Couldn't load subscription status.
- Fork 0
Creating a new application
This section details the development and maintenance of application repositories.
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).
To begin with create a new bare repository in the ISIS Motion Control organisation Github by:
- Clicking the green
Newbutton in the top right - Enter an
<application name>(such as MCU_001) - Enter a description
- Do NOT include a README.md, .gitignore, or, license
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):
- Create and enter the application folder
mkdir <Application name>
cd <Application name>
- 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
- 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
- Create a master branch for the application and push this to the application repository
git checkout master
git push origin
The newly created application repository will have the vendor_branch as it's default branch. Change this to master by:
- Select the application repository on the ISIS Motion Control organisation page
- Click
Settings->Branchesand selectmasteras 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.