Search code examples
gitpull-requestgrit

How to detect conflict between two git repositories.


To implement github like fork/pull request function in my project, the auto-merge feature need to detect conflict between source/target repository every time while viewing the pull request.

One solution comes to me is to analyze the 'git request-pull' output. Is there any easier method to detect the conflict?


Solution

  • Finally I wrote my own function to detect conflict.

    It is quite simple, just fetch all diff lines, and compare if there is same modifications.