-1

How to find git conflicts Before creating merge request? I want to find conflicts before create merge request and push that. if I test merge and not conflict exit branches merged and I don't want that.

AAV
  • 798
  • 1
  • 6
  • 23

1 Answers1

0

You can try to merge the base branch into your feature branch (or viceversa) to see if there are conflicts:

git fetch origin
git merge --no-commit origin/the-base-branch
if [ $? -ne 0 ]; then
    echo there are conflicts
fi
eftshift0
  • 26,375
  • 3
  • 36
  • 60