Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

278
Views
Merge conflict marker encountered

SourceTree Merge Conflict

I have created a local "Test" branch in SourceTree for testing some new features and everything seemed to work fine. Then I merged the "master" branch into my local "Test" branch and unfortunately, pushed it. But since then by running "ng serve" I'm getting the following error:


52 <<<<<<< HEAD
app/app.module.ts:54:1 - error TS1185: Merge conflict marker encountered.

54 =======
app/app.module.ts:56:1 - error TS1185: Merge conflict marker encountered.

56 >>>>>>> master
app/example/example.module.ts:9:1 - error TS1185: Merge conflict marker encountered.

9 <<<<<<< HEAD

I have no idea what's going on here. Is there any way to solve this issue easily?

over 4 years ago · Santiago Trujillo
8 answers
Answer question

0

while you're merging master into your local feature branch there are some conflicts, you need to resolve them by accepting the current or incoming changes. Open those files and remove these <<<<<<< HEAD >>>>>>> master and commit your changes. If you've Visual Studio Code will clearly show you the conflicts.

Files that had conflict marker:

app/example/example.module.ts:9:1 // in this file line number 9 should've conflict marker **>>>>>**
app/app.module.ts:54:1 // in this file line number 54 should've conflict marker **>>>>>**
app/app.module.ts:56:1 // in this file line number 56 should've conflict marker **>>>>>**

Once you resolved the conflicts and still getting the error, the files might have been cached, try to switching to another branch, then switching back to the original.

Still Webpack isn't noticing your file changes - https://dev.to/pnevares/webpack-isn-t-noticing-your-file-changes-did-you-do-something-wrong-34dc

over 4 years ago · Santiago Trujillo Report

0

For anyone coming from Google, I had a similar issue in React, but I was 100% confident that I had already resolved all conflicts.

I fixed it by switching to another branch, then switching back to the original.


If this still does not fix the issue, remove the Node Modules cache with rm -Rf node_modules/.cache

over 4 years ago · Santiago Trujillo Report

0

Make sure you pulled lastest code from the master branch before merging Master into Test.

over 4 years ago · Santiago Trujillo Report

0

For those coming from Google that:

  • had the error with React
  • are 100% confident they have already resolved all conflict
  • user-124812948 's answer did not work

I fixed it by deleting node_modules cache: rm -Rf node_modules/.cache

Here is the link to an article that explains what's happening

over 4 years ago · Santiago Trujillo Report

0

Also, you can try to stop and run the npm as a short solution. Worked for me.

over 4 years ago · Santiago Trujillo Report

0

Encountered this issue in React, and I am sure that the merge conflicts are resolved.

I fixed it by editing the file content, by simply add/remove some code, wait it compile and reload again.

over 4 years ago · Santiago Trujillo Report

0

Had the same issue, but with a Vue.js project. Suggested solutions did not work for me. I had to remove and re-install all the dependencies. Only after rm -rf node_modules && yarn install the error goes away!

over 4 years ago · Santiago Trujillo Report

0

If the conflict markers are in an auto-generated file, regenerate it.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!