---
title: "Collaborating and Merging - Projects and MQL5 Algo Forge - MetaEditor Help"
description: "Forking creates a personal version of someone else's repository under your own account. This gives you a safe, independent... - Collaborating and Merging - Projects and MQL5 Algo Forge - MetaEditor Help"
image: "https://www.metatrader5.com/i/logo_metatrader5.png"
url: "https://www.metatrader5.com/en/metaeditor/help/mql5storage/mql5storage_merging"
---

[MetaEditor Help](https://www.metatrader5.com/en/metaeditor/help) → [Projects and MQL5 Algo Forge](https://www.metatrader5.com/en/metaeditor/help/mql5storage) → Collaborating and Merging

# Collaborating and Merging Changes in MQL5 Algo Forge

## Forking Projects [#](#forking_projects)

Forking creates a personal version of someone else's repository under your own account. This gives you a safe, independent space to experiment and make changes without disrupting the original creator's codebase.

On the MQL5 Algo Forge website, you can [explore public projects](https://forge.mql5.io/explore/repos) created by MetaTrader 5 users all over the world. When you find a project you like, click "Fork" in the top-right corner.

![Forking a project webpage](https://www.metatrader5.com/i/help/metaeditor/en/fork_project_website.png)

When forking, you can enter a different name, choose what branches to copy, and edit the description. Click "Fork repository".

![Fork options webpage](https://www.metatrader5.com/i/help/metaeditor/en/fork_options_website.png)

The newly-created repository will now appear under your account in MQL5 Algo Forge. In MetaEditor, refresh [Shared Projects](https://www.metatrader5.com/en/metaeditor/help/mql5storage/projects#shared) to see the recently-created forked copy. To start working with the project files locally, you need to [clone it](https://www.metatrader5.com/en/metaeditor/help/mql5storage/mql5storage_merging#cloning_projects).

## Cloning Projects [#](#cloning_projects)

Cloning downloads a repository from the remote MQL5 Algo Forge onto your local computer. This creates a local working directory where you can edit files and commit changes before pushing them back to remote.

> Cloning is possible only for repositories where you have write access in MQL5 Algo Forge. If you want to work locally on your computer with files from a public project, you need to [fork the project](https://www.metatrader5.com/en/metaeditor/help/mql5storage/mql5storage_merging#forking_projects) first, then clone the forked copy.

In MetaEditor, expand "Shared Projects", right-click the project you want to clone, then select "Git Clone".

![Cloning a project](https://www.metatrader5.com/i/help/metaeditor/en/git_clone_project.png)

## Creating Pull Requests [#](#creating_pull_requests)

A pull request (merge request) is a formal proposal to review and integrate completed work from an isolated branch into a target branch. It also serves as a discussion hub where collaborators can check, comment, and test your code to ensure everything works before it is accepted.

These are common scenarios:

- If you worked in a separate branch of your own project, you create a pull request to merge changes into the main branch.

- If you worked in any branch of a forked copy, you create a pull request to merge changes into the main branch of the original project. Any of the project's maintainers then has to approve and accept the pull request.

Go to the webpage of the repository containing the changes, click "Pull requests", then click the "New pull request" button.

![Branch comparison webpage](https://www.metatrader5.com/i/help/metaeditor/en/new_pull_request_website.png)

On the "New pull request" page, select the branch you want to merge into and choose the branch from which you want to pull changes. The differences between the two selected branches will be highlighted. Click the "New pull request" button to continue.

![Branch comparison webpage](https://www.metatrader5.com/i/help/metaeditor/en/branch_comparision_pull_request_website.png)

On the next page, enter a name, comment, and other details for the pull request. You can add labels and milestones, assign the pull request to a specific person, and control edit permissions for maintainers.

![Pull request options webpage](https://www.metatrader5.com/i/help/metaeditor/en/pull_request_options_website.png)

Click "Create pull request" to finish, and the pull request will be opened for the repository.

## Merging Changes [#](#merging_changes)

Merging is the final step that combines an isolated branch containing changes into the destination codebase via a pull request. This action requires write permissions, meaning only authorized project maintainers can approve and merge a pull request.

On the MQL5 Algo Forge website, open the pull request you want to merge. You can navigate to the "Commits" and "Files changed" tabs to study and understand the changes, then return to the "Conversation" tab.

![Merging pull request options webpage](https://www.metatrader5.com/i/help/metaeditor/en/merge_pull_request_options_website.png)

Once you are satisfied, click the "Create merge commit" button, or you can use a different merge option.

> Available merge options and what they do:Create merge commit: Combines the branches by creating a new, dedicated "merge commit" that ties both histories together. This leaves a visible loop in your graph showing exactly when the branch started and ended.Rebase then fast-forward: Moves your branch's commits to the tip of the target branch first, then moves the target branch pointer ahead. This results in a perfectly flat, linear history with no extra merge commits.Rebase then create merge commit: Moves your branch's commits to the tip of the target branch first, but still generates a final merge commit when combining them. This keeps the history linear while explicitly documenting that a merge took place.Create squash commit: Compresses all the individual commits from your branch into one single, clean commit before adding it to the target branch. This is great for hiding messy, incremental work-in-progress commits.Fast-forward only: Integrates the changes only if the target branch has not received any new updates since you started working. If it has, the merge will fail, forcing you to manually sync your branch first.

## Resolving Conflicts [#](#resolving_conflicts)

Resolving conflicts requires you to [use an external Git client](https://www.metatrader5.com/en/metaeditor/help/mql5storage/mql5storage_external_client) or execute commands in a terminal.

### Conflicts when Pulling or Pushing in MetaEditor

When pushing changes from local to remote or pulling changes from remote into local, the automatic merge may fail due to a conflict. These are the typical conflict situations where competing changes have been pushed to remote already:

- Content conflicts (edit—edit). Another developer, working on the same branch, modified the same line of code you changed.
- Structural conflicts (delete—modify). Another developer, working on the same branch, deleted or renamed the file you edited.
- Binary file conflicts. Another developer, working on the same branch, has edited the same binary file (e.g. an image or PDF) you worked on. Git cannot read binary files line-by-line, so it cannot auto-merge them.
- Directory—file conflicts. In one branch, you or another developer deleted a file and created a folder with that exact same name. In another branch, someone continued using and editing the file as a standalone item.

When a content (edit-edit) conflict occurs while pulling changes in MetaEditor or another tool, Git automatically wraps the competing lines of code with visual conflict markers (<<<<<<<, =======, and >>>>>>>).

Here are the typical steps to resolve basic conflicts in an external Git client:

1. Locate the flagged file. Open your Git client to identify which files are conflicting.
2. Decide how to resolve the conflict:

     - If your client supports built-in visual merging, you can choose which version to keep, accept both changes, or manually combine them using the merge tool. Follow the prompts to resolve the conflict, then continue to step 4.
     - If you want the file to contain elements from both versions or prefer to edit the file yourself, open it in a text editor or IDE. Locate the conflict markers around the competing lines of code, then continue to step 3.

   Clean and save. Manually edit the conflicted block so the file contains the final version you want. Remove the conflict markers and any unwanted code, then save the file.Stage and commit. Your Git client should detect that the file has been modified. Stage the file (or mark it as resolved), then commit the changes to finalize and close the merge process.Push to remote. Send the newly committed merge resolution to the remote branch.

### Conflicts when Merging on the MQL5 Algo Forge Website

You may also encounter a Git conflict when merging one branch into another on the MQL5 Algo Forge website. In this case too, you have to [use an external Git client](https://www.metatrader5.com/en/metaeditor/help/mql5storage/mql5storage_external_client) or command-line tool on your computer to do the following:

1. Bring your local repository up to date. Open your local Git client, fetch the latest updates from the remote repository, then switch to the target branch you are attempting to merge into.
2. Reproduce the conflict locally. Initiate the same merge in your Git client. This should produce the same conflict that prevented the merge on the MQL5 Algo Forge website.
3. Decide how to resolve the conflict. Open the affected files in any text editor or IDE. Locate the conflict markers, manually edit the code to combine or select the correct changes, remove the markers entirely, and save the files.
4. Stage and commit. Stage the resolved files in your Git client to mark them as fixed. Commit the changes to officially complete the merge.
5. Push to remote. Send the newly committed merge resolution back to the remote branch. The MQL5 Algo Forge website will automatically detect that the conflict has been resolved and you can now perform the merge.

## In this section

- [Enabling MQL5 Algo Forge](https://www.metatrader5.com/en/metaeditor/help/mql5storage/mql5storage_connect)
- [Working with Projects](https://www.metatrader5.com/en/metaeditor/help/mql5storage/projects)
- [Working with MQL5 Algo Forge](https://www.metatrader5.com/en/metaeditor/help/mql5storage/mql5storage_working)
- [Viewing Project History](https://www.metatrader5.com/en/metaeditor/help/mql5storage/mql5storage_diff)
- Collaborating and Merging
- [Using External Git Client](https://www.metatrader5.com/en/metaeditor/help/mql5storage/mql5storage_external_client)

```json
{"@context": "https://schema.org", "@type": "BreadcrumbList", "itemListElement": [ {"@type": "ListItem", "position": 1, "item": {"@id": "https://www.metatrader5.com/en/metaeditor/help", "name": "MetaEditor Help"}}, {"@type": "ListItem", "position": 2, "item": {"@id": "https://www.metatrader5.com/en/metaeditor/help/mql5storage", "name": "Projects and MQL5 Algo Forge"}}, {"@type": "ListItem", "position": 3, "item": {"@id": "https://www.metatrader5.com/en/metaeditor/help/mql5storage/mql5storage_merging", "name": "Collaborating and Merging"}} ]}
{ "@context": "https://schema.org", "@type": "FAQPage", "mainEntity": [{ "@type": "Question", "name": "MetaTrader 5: Collaborating and Merging", "acceptedAnswer": { "@type": "Answer", "text": "Forking creates a personal version of someone else&#39;s repository under your own account. This gives you a safe, independent space to experiment and..." } }] }
```
