GIT.WTF

How to check for conflict markers in git?

Written by Sahil Bhatacharya in Accidents Recovery

While working with teams, there is a good chance of screw ups. There can be any mistake one of the most common is leaving conflict markers somewhere. Finding these markers can be tedious if you have a large repository.

Using the following command, you can check for these markers with file names & line numbers.

git diff --check

You can also use this command with your CI/CD setup to check for conflicts in your workflow as it exits with non-zero status if it finds any markers.

Sign up below to receive updates, tips and more handy tutorials when git screws up. It’s good stuff & I don’t spam.

A PRODUCT BY KHURAFAT