LoginSignup
136
85

More than 5 years have passed since last update.

git remote add を取り消す方法

Last updated at Posted at 2018-06-29

git remote rm ~ で削除できるが、~の書き方で迷った。
(間違えると usage: git remote remove <name> と諭される)

取り消す方法

  • まず現在登録されているリポジトリの確認
git remote -v

確認したときに、例えば以下のように出るはず
origin https://github.com/ユーザー名/リポジトリ名.git (fetch)
origin https://github.com/ユーザー名/リポジトリ名.git (push)

上の例ならば、以下のコードで取り消せるはず。

git remote rm origin

もう一度git remote -vで確認すると何も出なくなるので、
git remote addを正しいリポジトリでやり直し解決。

136
85
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
136
85