Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to migrate git Warehouse

Shulou Source: shulou.com Published: 2022-06-01 14:26:26 09月24日 Update

This article introduces the relevant knowledge of "how to migrate git warehouse". Many people will encounter such a dilemma in the operation of actual cases, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

1)。 Clone a nude version library from the original address, such as hosted on GitHub.

Git clone-bare git@git.oschina.net:tantexian/wishPatterns.git

-- the clone version library created by bare does not contain a workspace and is directly the content of the version library. Such a version library is called a nude version library.

2)。 Then create a new project, such as wishPatterns, on the new Git server.

3)。 Upload the code to the GitCafe server in the way of mirror push.

Cd wishPatterns.gitgit push-- mirror https://github.com/tantexian/wishPatterns.git

The naked version cloned by mirror registers the upstream version library so that it can be continuously synchronized with the upstream version library using the git fetch command in the bare version library.

4)。 Delete local code

Cd.. rm-rf wishPatterns.git

5)。 Find the Clone address on the new server GitCafe and Clone it locally.

Git clone https://github.com/tantexian/wishPatterns.git

In this way, all the content in the original library can be preserved.

This is the end of "how to migrate git Warehouse". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Tags: Version content server service warehouse code address method more knowledge utility learning and then original command dilemma actual that is workspace situation Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL Huawei Microsoft Shulou Technology Linux