0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Gitリポジトリを移行する手順

Posted at

はじめに

自分がリポジトリを移行する際に行った手順をメモ程度に書いています.

手順

1. 新しいディレクトリを作成しそこに移動する

mkdir hoge
cd hoge

2. mirrorを使い元のリポジトリのURLをcloneしてくる

git clone --mirror <元のリポジトリのURL>

3. 移行する新しいリポジトリのURLをセットする

git remote set-url <移行先のリポジトリのURL>

4. ディレクトリ内の〇〇.gitに移動して新しいリポジトリにpush

ls               // 〇〇.gitというのが表示されると思う(.gitの場合もある)
cd 〇〇.git      // lsで表示された〇〇.gitに移動する
git push --mirror <移行先のリポジトリのURL>

まとめ

自分はこれでうまくいったので参考にでもしていただけると嬉しいです.

参考

Gitレポジトリを移行する方法

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?