Skip to main content

此版本的 GitHub Enterprise 已停止服务 2022-10-12. 即使针对重大安全问题,也不会发布补丁。 为了获得更好的性能、更高的安全性和新功能,请升级到最新版本的 GitHub Enterprise。 如需升级帮助,请联系 GitHub Enterprise 支持

Backing up a repository

You can use Git and the API to back up your repository.

You can download and back up your repositories manually:

  • To download a repository's Git data to your local machine, you'll need to clone the repository. For more information, see "Cloning a repository."
  • You can also download your repository's wiki. For more information, see "Adding or editing wiki pages."

When you clone a repository or wiki, only Git data, such as project files and commit history, is downloaded. You can use our API to export other elements of your repository on your GitHub Enterprise Server instance to your local machine:

Once you have a local version of all the content you want to back up, you can create a zip archive and copy it to an external hard drive and/or upload it to a cloud-based backup or storage service such as Azure Blob Storage, Google Drive or Dropbox.