Howto::Export Git

From Computer Science Wiki
Jump to navigation Jump to search

Introduction

These instructions will show you the preferred method to copy a git repository from git.cs.vt.edu to version.cs.vt.edu or vise-versa. Notes

  • This method will retain your versioning history
  • Repo permissions such as who has access will likely change because accounts on the two sites are not linked
  • Docker images will not be copied, you will have to build and upload new versions of docker images to the registry
  • More detailed instructions/information: https://docs.gitlab.com/ce/user/project/settings/import_export.html

Export your repo

The first step is to create a export of your existing repo. This process will result in an exported .tgz file that you need to save somewhere to be used in the import process later.

  • Log into your existing repo through the web interface
  • Click on Settings in the left hand menu
  • Expand Advanced tab
  • Click on Export Project button
  • This will automatically create an export file and email you a link to the link
  • Download the file using the link in your email

Import your repo

At this point you will create a new project and import using the file you got from the first step.

  • Log in through the web interface
  • Click on the New project button
  • Click on the Import project tab
  • Click on the Gitlab export button
  • Give your project a name
  • Upload the export file from the first step
  • Click on Import project button
  • It might take a few minutes depending on the size of your project