gitlab migrate the repository (the repository of all retain the original content)

Procedure as follows :( not copy address, to change the specific item name address)

1. clone a bare repository from the original address, for example, was originally hosted on the old Gitlab

  • git clone --bare http://10.38.0.1/oldAddress/app.git

2. Then create a new project to the new Gitlab server, such as using the app of the same name.

3. Push the mirror upload code to the new Gitlab server.

  • cd app.git
  • git push --mirror http://10.38.0.2/newAddress/app.git

4. Delete native code

  • cd …
  • rm -rf app.git

5. Use the new Gitlab server address directly to the local Clone on it

  • git clone http://10.38.0.2/newAddress/app.git
Released eight original articles · won praise 0 · Views 215

Guess you like

Origin blog.csdn.net/Dawn____Dawn/article/details/103279070