E.Qasem
E.Qasem

Reputation: 21

git checkout results in fatal: unknown

I am trying to switch branches in Git so I ran git checkout <branch name>. It gives me this message:

fatal: unknown style 'dif' given for 'merge.conflictstyle"

Then, I tried to configure the dif by using this statement: git config merge.conflictstyle dif but it is not working.

screenshot of my terminal and me trying to switch branches

Upvotes: 2

Views: 342

Answers (1)

Ronan Boiteau
Ronan Boiteau

Reputation: 10138

dif is not a valid setting for merge.conflictstyle. The only 2 valid settings are merge and diff3.

So you can use one of these 2 commands:

git config merge.conflictstyle merge
git config merge.conflictstyle diff3

For a comparison of merge and diff3, see Git's documentation.

Upvotes: 3

Related Questions