If you haven't cloned acc before, start by cloning the project onto your local machine:
$ cd /home/spencerkiy (or wherever you want the acc project to be) $ git clone email@example.com:hla/acc.git
1. Checkout master branch & pull most recent version
$ git checkout master $ git pull
2. Create a new branch for editing
$ git checkout -b <yourbranchname>
note that if you already have a branch named , you will get an error message:
$ git checkout -b spencerdev fatal: A branch named 'spencerdev' already exists.
If this happens, first ensure that branch has previously been merged into master, then delete the branch:
$ git branch -d spencerdev
It is not recommended to re-use the same branch after merging it into master. More common practice is to make a new branch (for example to add a feature), then when it is complete merge it into master and delete the development branch.
3. Make the desired changes.
For example, make a new file:
4. Add and commit your desired changes locally
You can get a summary of changes you've made with:
Next, stage files to be commit that you want. Those can be done one at a time:
git add isac/sequence/my_new_sequence.xml
Or for example you can add all files that have been changed/updated:
git add -u
Last, commit the files you have stage in the adding process above, adding a summary message:
git commit -m "Added new sequence file"
4. Push the new branch to gitlab & request a merge into master
$ git push -u origin <yourbranchname>
5. Request a merge into master branch
Once you have pushed your branch to gitlab and the pipeline ran successfully, you can request for your changes to be merged into master. Go to 'Merge Requests' on the left menu, and select your branch as the source branch to be merged into master (the target branch):
Click 'Compare branches and continue'. On the next page:
- Change the title of the merge request if you like.
- Fill out a brief description of what changes you are merging in.
- Choose Olivier Shelbaya, Thomas Planche, or Brad Schultz as the Assignee.
- Check the box 'Delete source branch when merge request is accepted.'
- Click 'Submit merge request'. The assignee you selected will receive an e-mail, and likely the changes will be merged into master within a day or so.
6. Delete the development branch on your local machine
This is encouraged to ensure that the next time changes are done, they are started from the most recent version of master.
$ git checkout master $ git branch -d spencerdev