Skip to content
GitTree
History and recovery

Export an archive

Export Archive… writes the files of a commit, branch or tag as a .zip or .tar.gz, without the .git folder, like git archive. It is the quickest way to hand someone a release’s source.

FreeUpdated

Works in GitTree Free: every local Git feature, once you are signed in.

On this page
  1. Before you start
  2. Where to find it
  3. Steps
  4. Expected result
  5. What is and is not included
  6. If something goes wrong
  7. Questions
  8. Related

Before you start

  • The commit, branch or tag you want to export is in the graph.

Where to find it

  • Right-click a commit or a tag: Export Archive….
ActionmacOSWindows and Linux
Find the commit first⌘FCtrl+F

Steps

  1. Open the export

    Right-click the commit or tag and choose Export Archive….

  2. Choose the format and folder

    Pick Zip archive (.zip) or Gzipped tarball (.tar.gz). Under Folder inside the archive, type a prefix such as project-1.0/, or leave it empty.

  3. Save

    Press Export… and choose where to save the file.

Expected result

A .zip or .tar.gz with the files exactly as they were in that commit.

What is and is not included

  • Files marked export-ignore in .gitattributes are left out; export-subst placeholders are filled in.
  • Git LFS files are written as their small pointer files, not their content.
  • Submodules are not included: their folders are left out.

If something goes wrong

“This folder name cannot be used”

Use / between folders and end the prefix with /, such as project-1.0/.

Questions

Does the archive include my uncommitted changes?

No. It contains the commit exactly as recorded.