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?

あらまし

普段GitHubを使用してリポジトリを管理していますが,GitHubのアカウントがわからなくなり,アカウントを新規作成することになりました.
少なくとも現在使用中のリポジトリを新アカウント移行するために行なったことをまとめました.

概要

  1. 新規アカウントを作成する
  2. 移行先のリポジトリを作成する
  3. 設定しているリモートリポジトリの紐付けURLを変更する

設定しているリモートリポジトリの紐付けURLを変更する

git remote -vを使用し,現在紐づけられているリモートリポジトリのアドレスを確認します.

.結果
origin	https://github.com/XXXX/TEST.git (fetch)
origin	https://github.com/XXXX/TEST.git (push)

git remote set-url を使用してoriginのurlを変更します.
git remote set-url origin https://github.com/XXXX/NEW.git

.結果
origin	https://github.com/XXXX/NEW.git (fetch)
origin	https://github.com/XXXX/NEW.git (push)

urlがTESTからNEWに変更されていることがわかります.
この状態でプッシュをすると新しいリポジトリにプッシュされます.

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?