MEDUSA
, Making best use of git
How to develop Here are some hints to develop MEDUSA with git.
in the following how-to
page, you'll be shown how to create your own branches and 'issues' that will help you develop and trac your changes.
Imagine you have a bugfix or a whole new component to add in MEDUSA.
First on the MEDUSA gitlab : create a new issue :
(i know you're not necessarily facing an issue, but that's how git calls it...)
The issue creates a page that will be linked to your development, where you can describe what you plan to do, why, the different steps to do it,...
Create a merge request (based on the main branch).
Creating merge request will also create your development branch associated to this merge request.
If we take my biopole work for example :
You can see your merge request:
Split the work in steps
To make the coding easier, and for you to have a better idea of what you've done,
you might want to split your work in 3 or 4 stages.
For example, for my diapause work,
- 1- stage was in 1D to move the mesozoo at depth and back up depending of the time of year, and change the metabolism once at depth.
- 2- Let the mesozoo bring some Carbon at depth with them (as if they had made some stocks of fat for the winter)
- 3- move to 3D, adapt the diapause and wake up timings to the 3D... For this, you might want to do a separated branch for each stage, based on the merged request branch, that you'll merge back to it once the work is done.
This is done this way :
First, create a new branch :
Then still based on my diapause work example.
I want to create a branch based on my previous Diapause work (already on the diapause branch), that will only contain the next stage work.
Then, name your new work branch, and create it.
Next, create a merge-request for this branch :
-- Gitlab suggests it straight away :
But, in case you missed it, you can still do it.
Go to merged request, and... well, gitlab got updated, it does remember!
Once you click on "create merge request", beware to ask to merge you work branch onto your main project branch:
And change the target branch :
Then you can finalize you merge request :
Now you're good to work!
But don't forget to work on your new branch :
From the main directory of your checked-out MEDUSA-git :
- Check there is no work done on the branch you're on, that you might have forgotten to commit, with "git status"
- Then, once you're sure nothing is left un-commited, make sure your branch is up-to-date, and knows about your newly created branch with "git pull".
- Now you can switch to the new branch with "git switch ${branch-name}"
- And from there, you should be ready to develop on your new branch.
Hope that helps!