Skip to main content

Git conflict

This error occurs when the versions of the local and external repository differ.

There are several possible solutions for this error.

  • Clone the repository again
  • Using the second branch, merge the changes

Clone the repository again

This option is faster, but it has its drawbacks. If you want to clone the repository again, then all local changes will be lost, and you will get the state of the files that are on git.

In order to perform this action, you need to go to the git section in the deployment settings and click on the "Clean and clone" button.

Using the second branch, merge the changes

In this case, you can merge the local changes with the changes that were made in the git repository.

To do this, you need to follow these steps :

  • Log into your git repository and create a new branch in git.
  • Go to the get section in the deployment settings and click the "Git Push" button.

In the window that opens, specify the name of the branch you created and click "push to ExamleBranchName"

setting page push

  • After that, go to your git repository and merge with the branch where the conflict occurred (merge if you are using gitlab, or delete request if it is github)
  • In the next step, you need to return to the git page in the deployment settings, make sure that the main branch is specified, and click on the "Git pull" button.

If all the actions were performed correctly, then you should get the combined changes as a result.