Skip to content
Snippets Groups Projects
gitlab.md 4.36 KiB
Newer Older
---
layout: default
title: Git and GitLab
parent: Open WIN Tools
has_children: true
nav_order: 5
---


# GitLab
{: .fs-9 }

How to use the WIN GitLab instance for your code and documentation
{: .fs-6 .fw-300 }

---

![gitlab-logo](../../img/logo-gitlab.png)

## Overview
GIT is a service which allows version control of material and syncing between local (on your computer) and remote (on a server, accessible through a web browser) versions of material. These remote and local versions are useful for backup and collaboration, where different users can access the same remote content.

WIN provide a git service using the open source [GitLab software](https://about.gitlab.com). We have installed GitLab on our internal servers, so you can use it to maintain your material in a space where we have complete control over who can access it.

GitLab is best used for the management of text-based documents with some pictures (not nifti brain images!). This mainly covers code and documentation. It is also useful for project management by logging issues and milestones, and tracking collaboration.

### Benefits
#### Version control ![version-control](../../img/icon-version-control.png)
GitLab manages your version control. This means that each change you make to the remote repository is tracked and can be reversed. This is helpful for undoing changes (you can revert to earlier points in time) and tracking who has made changes on a collaborative project.

#### Citable research output ![doi](../../img/icon-doi.png)
Your gitlab repository can be assigned a digital object identifier (doi). This means everything containing within your repository can be cited as a research output, be it code or documentation. Find out how to [create a doi for your repository](gitlab/4-2-you-doi.md).

#### Managed and attributable collaboration
Git and GitLab are an excellent resource for inviting others to contribute to your material. Potential collaborators can be internal to WIN or external. Changes can be incorporated automatically if the collaborator is trusted and known to you (invited directly), or suggested via a "merge request" if the collaborator is not part of your invited group. This process also makes it very easy to follow who has made what contribution, so they can be appropriately attributed for their efforts.

#### GitLab pages
GitLab pages allows you to build professional looking websites, like this one! It is relatively straightforward to build a simple website to share your work with the world, and the options for building in additional complexity are endless.


## How to use
Follow the below tutorials (left in the navigation panel) to set up and use GitLab for hosting, communicating and managing your version controlled projects

### 1. Tools for git and GitLab
- [1.1 Using the command line](1-1-tools-command-line)
- [1.2 Writing in markdown](1-2-tools-markdown)
- [1.3 Atom text editor](1-3-tools-atom)

### 2. Getting started
- [2.1 Your GitLab account](2-1-starting-gitlab-account)
- [2.2 Global git configuration](2-2-starting-configure-git)
- [2.3 Your local repository](2-3-starting-local-repo)
- [2.4 Basic git commands](2-4-starting-git-basics)

### 3. Collaborating on GitLab
- [3.1 Collaborating on GitLab](3-1-collaborating-stranger-or-collaborator)
- [3.2 Collaborating with a stranger](3-2-collaborating-fork-their-repo)
- [3.3 Play with this page](3-3-collaborating-play-with-this-page)

### 4. Making and publishing your repository
- [4.1 Make a repository](4-1-you-make-your-repo)
- [4.2 Create a doi](4-2-you-doi)
- [4.3 Making your pages site](4-3-you-make-your-pages-site)

### 5. Managing your project on GitLab
- [5.1 GitLab issues](5-1-projectmanagement-issues)
- [5.2 GitLab milestones](5-2-projectmanagement-milestones)

## Who should I ask for further advice about using GitLab
The Open WIN community are a great resource for support in using GitLab. [Join the community](https://open.win.ox.ac.uk/pages/open-science/community/Open-WIN-Community/docs/contact/) and try asking your question on slack!

You are very welcome to as the [Open WIN Engagement Coordinator](https://open.win.ox.ac.uk/pages/open-science/community/Open-WIN-Community/docs/community/community-who/#community-coordinator---cassandra-gould-van-praag-sheher) for specific advice on using GitLab.

Technical issues on the GitLab instance should be directed to [WIN IT](https://sharepoint.nexus.ox.ac.uk/sites/NDCN/FMRIB/IT/Pages/default.aspx).