Skip to content

Development

Development instance

Get your personal development instance preinstalled with everything needed to get into development mode at Gitpod.

https://gitpod.io/#https://git.drupalcode.org/project/drupalcenter

You will need to register and authenticate against your d.o Gitlab account to proceed from there. If successfull, this is what you get:

Gitpod development instance

Identify yourself

@todo git config username, email
@todo authenticate with git.drupalcode.org

The codebase

Update the repository

Go to the console and run

git pull
git pull

Rebuild the codebase

Go to the console and run

composer update
ddev composer update

Import updated configuration

Go to the console and run

drush config:import
ddev drush config:import

Install from config

Go to the console and run

drush site:install --existing-config --account-pass=admin
ddev drush site:install --existing-config --account-pass=admin

The development workflow

Issue creation

Create an issue in the issue queue describing the task your planning to work on:

Issue fork creation

Create an issue fork to be able to work on your issue in isolation without affecting others until you finished.
On your issue click on the green button labeled

Checkout issue fork

To be able to work on your issue fork you need to check it out.
On your issue click on the blue link labeled

You get the commands to check out the issue fork into yout workspace. e.g. Gitpod or local DDEV environment.

Those look like

git remote add drupalcenter-3479262 git@git.drupal.org:issue/drupalcenter-3479262.git
git fetch drupalcenter-3479262

Copy them CTRL+c one by one and past them CTRL+v nto your terminal. This will add the issue fork as a new remote repository and check the files out.

You can now change, add or remove files by following a

General Git workflow

Show the repository status (added, removed, changed files)

git status
Add a new file or a changed file
git add {filname}

Remove a file -======= git rm {filname}

Undo changes to a file
git reset {filname}
Undo changes to the whole repository
git reset --hard
Push files to the remote repository
git push

After the push you can open a merge request in Gitlab by CTRL+clicking the link that appears in the terminal, e.g.