---
# System prepended metadata

title: Development Process

---

# Development Process

This guide assumes you are familiar with Node.js, git, ssh keys, and the command line. If not, please speak to a project manager to assist you.

You will need the following installed:
* Git
* Node.js
* npm

## 1. Opening an issue
1. In Github navigate to the issues tab for the relevant repo.
2. Search issues to see if your issue has been addressed already.
2. Click the new issue button.
3. Edit the title, body and even add screenshots.
4. Don't worry about adding labels, assignees etc. Team management will take care of that.
5. Click the submit new issue button.

## 2. Clone repo and run locally
Navigate to your repo of choice on github and copy the SSH URL and in the terminal run the following command:
```bash
git clone git@github.com:phylogeny-explorer/phylogeny-explorer.git
```
Run the following command to install the dependencies and tools for the project:
```bash
npm install
```
Shortcut: `npm i`

After that start up the server to access Client or backend endpoints locally
```bash
npm run dev
```

## 3. Making changes
Make sure you're in the `development` branch or navigate to it using:
```bash
git checkout development
```
Shortcut: `gcd`

Pull the latest changes, if any:
```bash
git pull origin development
```
Shortcut: `ggl` (pulls origin of the current branch)

Create a new branch:
```bash
git checkout -b [BRANCH_NAME]
```
Shortcut: `gcb [BRANCH_NAME]`

Checking the status of files; untracked, tracked, and staged:
```bash
git status
```
Shortcut: `gst`

After making changes:
```bash
git commit -a -m '[COMMIT_MESSAGE]'
```
Shortcut: `gcam '[COMMIT_MESSAGE]'`

Remember if you add any new files you must add them to the staging area first:
```bash
git add .
git commit -m '[COMMIT_MESSAGE]'
```
Shortcut:
```bash
ga .
gcmsg '[COMMIT_MESSAGE]'
```

## 4. Pushing changes
It's a good idea to pull and merge `development` into your branch often to reduce merge conflicts.
Let's do that before we push. First checkout `development`:
```bash
git checkout development
```
Shortcut: `gcd`

and pull:
```bash
git pull origin development
```
Shortcut: `ggl`

then checkout back to your feature branch:
```bash
git checkout [BRANCH_NAME]
```
Shortcut: `gco -`

merge development into your branch:
```bash
git merge development
```
Shortcut: `gm development`

> This can either be a seamless fast-forward merge or a true merge; with or without conflicts.
> If you're new to git this can be a confusing process so attempt to fix yourself, read up more on git and if needed ask on the Slack channel.

Once merged with `development` and all conflicts are fixed, push to `origin`:
```bash
git push origin [BRANCH_NAME]
```
Shortcut: `ggp` (pushed to origin of current branch)

IMPORTANT never push directly to `master` or `development`

## 5. Opening a pull request
Once your branch is pushed to `origin` you can make a pull request so other devs can review your changes. This is also when the continuous integration testing happens.
1. In Github navigate to the pull request tab for the relevant repo.
2. Either click the special new pr button for your branch you just pushed or click the big new pr button and choose your branch as the comparison.
3. Edit the title, body and even add screenshots.
4. Assign yourself, pick reviewers if you know who, connect to Zenhub ticket etc.
5. Click the open pr button.
