How to use non-text documents, such as docx, exe, or zip with Bitbucket Server and Data Center

Still need help?

The Atlassian Community is here for you.

Ask the community



There is often a need to keep all project-related objects, such as Requirements docs, presentations, source code and build executables within Bitbucket, and control their access. These files are typically documents with extensions docx, pptx, pdf or binary files such as exe, zip or tar.gz.


There is no built-in way in Bitbucket Server itself to recognize or manage these files. However, Git LFS offers commands to manage non-text files. It may not be possible to preview the files in Bitbucket UI. However, they can be downloaded. The files can also be locked using Git LFS locking API (since 6.3) and the locking previewed in UI (since 6.4).


  1. Install git-lfs on the client, if not already installed
  2. Initialize the repository location with LFS
    git lfs install
  3. Track your non-text documents with Git LFS

    git lfs track "*.docx"
  4. Commit

    git add .gitattributes
    git add *.docx
    git commit -m "DOCX files now tracked by Git LFS"
  5. Push changes to remote

    git push

See Git LFS for more information.

Last modified on Feb 9, 2021

Was this helpful?

Provide feedback about this article
Powered by Confluence and Scroll Viewport.