LoginSignup
2
3

More than 3 years have passed since last update.

git remote addでエラー「fatal: remote origin already exists.」

Last updated at Posted at 2018-01-21

git remote addエラー

次のようなエラーが出る

#git remote add origin https://github.com/ユーザ名/レポジトリ名.git
fatal: remote origin already exists.

対処法

originがすでに設定されているので以下のコマンドで削除してから再度git remote addを行えば良い

$ git remote rm origin

git originの設定を確認

以下で確認が可能

$ cat .git/config
2
3
1

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
3