word file git diff

  1. .gitattributes file in root folder of your git project
    *.docx diff=pandoc
    
  2. .gitconfig file in your home folder
    [diff "pandoc"]
     textconv=pandoc --to=markdown
     prompt = false
    

Link