-1

I have a branch called editinfopage.

I have used the commands to merge the branch with master:

  1. git checkout master

  2. git pull origin master

  3. git merge editinfopage

Then I'm getting this error:

> Auto-merging routes/users.js
>     CONFLICT (content): Merge conflict in routes/users.js
>     Auto-merging models/user.js
>     CONFLICT (content): Merge conflict in models/user.js
>     Auto-merging frontend/src/services/auth.service.ts
>     CONFLICT (content): Merge conflict in frontend/src/services/auth.service.ts
>     Auto-merging frontend/src/pages/register/register.ts
>     Auto-merging frontend/src/pages/login/login.ts
>     CONFLICT (content): Merge conflict in frontend/src/pages/login/login.ts
>     Auto-merging frontend/src/pages/editinfo/editinfo.ts
>     CONFLICT (content): Merge conflict in frontend/src/pages/editinfo/editinfo.ts
>     Auto-merging frontend/src/pages/editinfo/editinfo.scss
>     CONFLICT (content): Merge conflict in frontend/src/pages/editinfo/editinfo.scss
>     Auto-merging frontend/src/app/app.module.ts
>     CONFLICT (content): Merge conflict in frontend/src/app/app.module.ts
>     Auto-merging frontend/package.json
>     CONFLICT (content): Merge conflict in frontend/package.json
>     Auto-merging frontend/config.xml
>     CONFLICT (content): Merge conflict in frontend/config.xml
>     Removing frontend/back-end/server.js
>     Removing frontend/back-end/routes/routes.js
>     Removing frontend/back-end/package.json
>     Removing frontend/back-end/package-lock.json
>     Removing frontend/back-end/models/contacts.js
>     Automatic merge failed; fix conflicts and then commit the result.`

How can I solve this issue?

Sridhar
  • 11,466
  • 5
  • 39
  • 43
  • 2
    You have many conflicts between the branches, you must solve them before the merge. See here: https://stackoverflow.com/questions/161813/how-to-resolve-merge-conflicts-in-git And here: https://help.github.com/articles/resolving-a-merge-conflict-using-the-command-line/ – Shayki Abramczyk Aug 02 '18 at 12:24
  • 1
    Possible duplicate of [How to resolve merge conflicts in Git](https://stackoverflow.com/questions/161813/how-to-resolve-merge-conflicts-in-git) – phd Aug 02 '18 at 13:19

1 Answers1

1

The output is self-explanatory. You have merge conflicts. You need to fix all of them. Configure any merge tool of your choice and do -

git mergetool

This command will open your configured merge tool where you can choose between a local and remote change to keep. Once you are done with all files, you will have to commit those as your merge commit.

My personal favorite merge tool is meld. Download it from the internet and set into your global git config using-.

git config --global merge.tool meld
priteshbaviskar
  • 2,139
  • 2
  • 20
  • 27