Word Files in GitHub

Prompt: Can I use GitHub on my windows laptop to store and version control Word documents?

Copilot: Yes, you can use GitHub on your Windows laptop to store and version control Word document! However, Git treats Word documents as binary files, which makes it difficult to see changes between versions olickel.com . To overcome this, you can use a tool called Pandoc to convert Word documents to a text format that Git can track more effectively . Here’s a brief guide on how to set it up: Install Pandoc: Download and install Pandoc from its official site github.com .

  • Update Your .gitconfig File: Add the following lines to your .gitconfig file to tell Git to use Pandoc for Word documents github.com :

plaintext

Copy

plaintext
Copy
[diff "pandoc"]
textconv = pandoc --to=markdown prompt=false
[alias]
wdiff = diff --word-diff=color --unified=1
```
  • Create a .gitattributes File: Add the following line to a .gitattributes file in your repository:
plaintext
Copy
*.docx diff=pandoc
```
  • Commit Your Word Documents: Now you can commit your Word documents to your repository, and Git will use Pandoc to convert them to Markdown for better tracking github.com .

Would you like more detailed instructions or help with any specific step?

Leave a comment

I’m Jaycee

Currently, I am a drafter and plodding editor of my own fiction stories. Looking towards the future when edited stories turn into published ones.

Here I am starting to bare my soul to give you a preview of what I have been working on.

See “Harvest of Blood” in this site’s menu bar for a preview of a draft chapter from Boudica and The Butcher, a novel set in a future Second American Civil War.

Let’s connect