LoginSignup
0
0

More than 1 year has passed since last update.

Gitでリモートリポジトリとの紐付けを解除する

Last updated at Posted at 2023-03-24

エラーメッセージ

git error: remote origin already exists.

新プロジェクトを作成し、リモートリポジトリと紐付ける段階で上記のエラーが出てしまう。

対応

現在紐づいているリモートリポジトリを確認するため、下記のコマンドを実行する。

git remote -v

出力されたリモートリポジトリの一覧から登録されている名前を確認し、紐付けを解除するための下記のコマンドを実行する。(初期値はorigin)

git remote remove origin

以上の手順を実行することで、新たに作成したリモートリポジトリとの紐付けが可能な状態にすることができる。

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