git-js icon indicating copy to clipboard operation
git-js copied to clipboard

Pull() fails but not getting merge conflict details

Open gourangamurari opened this issue 4 years ago • 1 comments

Hi, I am executing SimpleGit.pull('origin','master') and it is failing because of some merge conflict in my local. I want to get the details about the conflicted files and more details on conflict from response/error. How can I do that?

Thank you.

gourangamurari avatar May 19 '21 09:05 gourangamurari

Hi, you can use the two fetch and merge phases of a git pull independently:

git.fetch().merge('--no-ff', 'origin/master').catch(err => {
 // err is a GitResponseError wrapping a MergeResult object with full error detail
})

It looks as though the pull interface doesn't include the full error message - I'll add that in an upcoming release. Thank you for raising it as an issue

steveukx avatar May 23 '21 16:05 steveukx