2
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 3 years have passed since last update.

Gitlab⇒Githubに移行した話

Posted at

会社の都合で移行するぞーってなった備忘録

1	旧リポジトリのミラーリポジトリを開発用PCに作る
	git clone --mirror git@gitlab_gitname tmp
	
2	ミラーリポジトリに入って内容物を確認
	cd tmp
	ls -l
	
3	remote originのURLを新リポジトリに向ける
	git remote set-url origin git@github_gitname.git
	
4	新リポジトリにミラー内容をpush
	git push --mirror origin
	
5	新リポジトリからcloneしてくる
	git clone git@github_gitname.git

SSHでミラー出来ない場合はHTTPSでやるとうまくいった
SSHでミラーする場合はSSHキーを作り直すとうまくいくらしい
tmpファイルはあとでいらなくなるので消してもいい。

2
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
2
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?