Producing Docs

Once you initialized your repository, writting docs can be done as usual: Use your favorite Microsoft Office apps.


When committing your OpenXML files, DocAsCode pre-commit and post-commit will automatically convert your .docx to a markdown preview.

If the source file is located at /path/to/file.docx, then the preview file can be found at .docascode/markdown/path/to/ and embedded images are location at .docascode/markdown/path/to/file.


At any time in the writing process, you may need to see the diff of your files. The usual

git diff

will print the text diff into your console. Otherwise, you can use the following command:

docascode diff --file /path/to/file.docx --base [base revision or base version] --new [new revision or new version]

DocAsCode will produce a comparison of the selected file. Each added or removed item will be displayed as revision marks.

Options --base and --new can be either a git revision (branch, tag, commit ID) or a Maven deploy version, provided the file is referenced in chrono.xml.

Notice that this diff feature is only available on Windows, with Powershell and Word Application.


On Windows, with Powershell and Word Application, DocAsCode offers a support for merging docx files within git. A non trivial git merge results in a conflicted file, each contribution of branches are displayed with revision mark you need to inspect before committing the merge.