How to complete or modify the message about a merge conflict?

Viewed 70

example:

 git pull origin master            
From some.remo:some/repo
 * branch                master    -> FETCH_HEAD
CONFLICT (content): Merge conflict in src/file_0
Auto-merging src/file_1
CONFLICT (content): Merge conflict in src/file_2
Automatic merge failed; fix conflicts and then commit the result.

How can I get this output and add mine to it?

I tried to pick up some git hooks through husky, but did not find anything suitable (or misused)

What I want to get at the output (roughly):

 git pull origin master            
From some.remo:some/repo
 * branch                master    -> FETCH_HEAD
CONFLICT (content): Merge conflict in src/file_0
Auto-merging src/file_1
CONFLICT (content): Merge conflict in src/file_2
Automatic merge failed; fix conflicts and then commit the result.

Conflicts list:
src/file_0
src/file_2

At the moment I am running a separate command that runs the git pull, but this requires training from the rest of the team and is less flexible.

1 Answers

You first need to resolve the conflicts and then do git commit. The default message will contain a list of files that had conflicts. It won't be word-for-word exactly the same as the output from git pull, but it will contain the same information.

Related