🌈
git リモートリポジトリのURLの変更
git remote set-url
コマンドでリモートリポジトリのURLを変更しました。
手順
- 現在設定されているリモートURLを確認する
git remote -v
origin https://github.com/OWNER/REPOSITORY.git (fetch)
origin https://github.com/OWNER/REPOSITORY.git (push)
- リモートURLを新しいURLに変更
git remote set-url origin https://github.com/OWNER/NEW-REPOSITORY.git
- 変更を確認する
git remote -v
origin https://github.com/OWNER/NEW-REPOSITORY.git (fetch)
origin https://github.com/OWNER/NEW-REPOSITORY.git (push)
参考
Discussion