0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【Git】既存レポジトリのURLが間違っている場合の対処法

Posted at

背景

VSCodeで複数のGitレポジトリを管理している際に「あれ、今接続してるレポジトリってなんだっけ」となった時や、「違うレポジトリに変更したいな」となった時の対応を忘れたくないので、備忘録として記載します。

既存リポジトリのURLが間違っている場合の対処

対応としては簡単で、現在の接続先レポジトリを確認して、接続したいレポジトリを変更するだけ。

# 現在のリモートURL確認
git remote -v

# 正しいURLに変更
git remote set-url origin https://github.com/正しいユーザー名/正しいリポジトリ名.git
0
1
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
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?