Gitlab template updates
Download git protocol: https://github.com/git-guides/install-git
All templates can be found here: https://gitlab.npolar.no/npdc/other/npdc-docs-public-repo/templates
We assume you want to update the contaminant template in this example, but any of the repositories can be updated. Also, no need to install git if you are not going to update templates.
If you want to update any template to a new version, please check first that the field is not already added under another name - ask siri.uldal@npolar.no.
1. First establish the repo locally/get the files:
> git clone git@gitlab.npolar.no:npdc/other/npdc-docs-public-repo/templates/contaminant.git
You can get the correct link by going into the repository f.ex. contaminant and the blue button to the right marked “Code”. Usually choose https cloning:
When the code is downloaded, f.ex. contaminant
> cd contaminant
Under here you can find the files.
2. Upload the updated version of the file:
Create or replace the file in the repo with the new version. Remove, update or replace the files as you wish.
> git status
Now you should see the files that are registered for updates, and the files that have changed but are not staged for commit and untracked files. Add the files you want to include in the repo:
> git add <filename1> <filename2> <filename3>
Use git add on the files that git has not yet registered the changes for.
> git commit -m “add a descriptive message of what the changes you have added are”
Use git commit to tell git that the updates you have done are now all included and add a descriptive message for what has been done.
> git push
You may have to provide your git name and password. If all goes well, the repo on the gitlab server should now be updated.
3. Upload a new version of the tag:
With the new updates you should also add a tag. Here a tag is three numbers with dots in between like f.ex. 1.0.3.
The first number is called major number, is increased when there are significant improvements of changes in functionality, f.ex. when the new version of the schema is no longer build on the previous version at all - they are two different schemas, one replacing the other.
The second number is called the minor number and is incremented when there are minor feature changes or notable fixes, updates.
The third number is the revision number and is used for minor name changes, fixing texts etc.
So 1.0.3 means the first major schema with a few small changes/corrections.
> git tag
Use this command if you wish to see all created tags/check that your tag is not already created.
> git tag v1.0.4 -m “add a message that describes the tag updates”
With a new upload of the excel schema you should add a new tag. Add a message for the tag to explain what has changed
> git push origin v1.0.4
Upload the tag to the gitlab server
You should now be able to see the tag by clicking on the Tag link to the right in gitlab, https://gitlab.npolar.no/npdc/other/npdc-docs-public-repo/templates/contaminant