Skip to content

How to use the NEA GitLab

This page provides some information and links to other resources to assist users with git version control. For users that do not want to make use of a terminal, the GitLab system offers an intuitive and sophisticated graphical web interface. You can navigate to projects with your browser and perform a wide range of tasks including downloading files, reporting issues and even proposing changes (subject to permissions).

For those interested in using terminal-based commands, you can find some introductory information below and more links below.

Clone a copy to your local machine

Using a suitable command line interface, change from the current working directory to the location where you desire the cloned directory to be housed. Run:

git clone <URL_of_your_forked_copy>

Note that only https protocol is supported when cloning. The ssh protocol is not supported due to NEA IT policies. Due to this, remote actions can require username and password credentials every time, and for repeated actions this can become rather laborious. To avoid repeated username and password demands, you can use the credential.helper to cache your username and password. This can be done by setting a cache period in seconds, for example to save it for 1 week:

git config --global credential.helper "cache --timeout=604800"

When you fork a project in order to propose changes to the original repository, you can configure Git to pull changes from the original or upstream repository into the local clone of your fork. This can be achieved on the command by typing in:

git remote add upstream <URL_of_original_repo>

Start working in a different branch

Checkout and create a new branch with the name you want (for example, develop):

git checkout -b <your_desired_branch_name>

Add locally created or modified file

The git add command adds new or changed files in your working directory to the Git staging area.

git add <file_name>
This step will ensure that the modified files will be included in the next commit. When ready, you can finalise a version by creating a commit, describing the changes you've done, with:

git commit -m "your commit message"

Sync with the remote repository

In case someone made changes to the origin repository you can take those changes first by receiving them automatically. You can do this by typing:

git pull

It downloads the content from a remote repository and immediately updates your local copy to match the content. This command will update the remote repository with the modifications performed in your local environment. On the command line, run:

git push origin <remote_branch_name>

Congratulations! You've made your first contribution on git.oecd-nea.org!

You may now also create a merge request which will have to be approved by the code maintainers.

Using the VS Code Working Environment

Configuring your work environment

We recommend using GitLab Workflow Visual Studio Code Extension for seamless working with the NEA git instance. To configure it properly, please follow these steps:

  • On git.oecd-nea.org go to Settings (top-right corner of the homepage) and select Access Tokens on the left navigation menu;
  • When at the Add a personal access token form:

    • Give a name to your token;
    • Select api at the Scopes:;
    • Select Create personal access token;
    • Copy the token under the Your new personal access token;
  • Go to your VS Code editor:

    • Open Command Palette by pressing Ctrl+Shift+P;
    • Search for "GitLab: Set GitLab Personal Access Token" and hit Enter;
    • Enter the URL https://git.oecd-nea.org of the NEA GitLab instance and hit Enter;
    • Paste your token and hit Enter.

That's it! Now you have user-friendly built-in VS Code source control.

Work using the VS Environment

Start using it with typing in Command Palette:

Git: Clone
to see the list of repositories available to you.

To make changes to the projects cloned into your local machine, create new branch by typing in Command Palette:

Git: Checkout to

To update your local version of code by syncing it with the origin (in case someone is simultaneously making changes to the source code), in Command Palette type:

Git: Pull

To make changes to your version of code on the branch you've created, edit the source files by going to Source Control (on the left panel), type your commit message describing the commit and hit the Commit button. Push your commits to the git remote repository by clicking Synchronize Changes at the bottom left corner.

To merge changes into the main branch, with:

Git: Checkout to

go to master branch, and then, pick a branch to include with a command:

Git: Merge Branch

More on Git Workflow

Learn more on how to use GitLab with VS Code

You could find useful lessons on software-carpentry.org, with tutorials on: