GitLab/Workflows

= GitLab Workflows =

GitLab is a code hosting, review, and continuous integration platform.

We're running a community consultation on moving from Gerrit to GitLab for Wikimedia code review.

This is a tutorial which explains how to use our trial GitLab instance for Wikimedia development. Depending on the result of the consultation, it may become a reference for production use.

Clone a repository from gitlab-test
Make sure that you cloned the code repository that you are interested in (see here).

Make sure that you are in the directory of the code repository (the command tells you where exactly you are).

Forking a repository
If you don't have developer-level permissions on the project you'd like to contribute to, you'll first need to copy the repository to your own account. This is known as "forking".

Update main branch
Typically this will be.

If you're working on a fork, make sure you have the latest code from upstream.

structure we're yoinking, ish
2 What is GitLab?

6 Prepare to work with GitLab (maybe nothing needed)

A lot of this is implicit in people's existing GitHub knowledge, if we're honest

7 Submit a patch

7.1 Update master

7.2 Create a branch

7.3 Make your changes

7.4 Stage your changes for a commit

7.5 Commit your staged changes

7.6 Prepare to push your commit to Gerrit

7.7 Push your commit to GitLab

7.8 View the Change / Next Steps

8 Other common situations

8.1 Squash several commits into one single commit via rebase

8.2 Amending a change (your own or someone else's)

8.3 Push to a branch different than master

9 Editing via the web-interface

10 How code is reviewed in Gitlab

10.1 Review before merge

10.2 Who can review? Gitlab project owners

10.3 How to comment on, review, and merge code in GitLab

10.3.1 Viewing and commenting on code

10.3.2 Comparing patch sets

10.3.3 Formally reviewing and merging or rejecting code

Additional Info

 * Branching models for repos