7
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【GitHub】リポジトリ名を変更する

Posted at

はじめに

リポジトリ名を変更するとそのリポジトリのリモートリポジトリURLが変更されるので、ローカル環境においても参照するリモートURLを更新する必要がある。

手順1.GitHubのウェブサイト上でリポジトリ名を変更する

リポジトリの settings から rename する。

手順2.ローカル環境でのリモートURLを変更する

以下を順番に実施
$ git remote -v
$ git remote set-url origin <新しいリポジトリ名のURL>
$ git remote -v
set-urlの後にリポジトリURLが変わってたらOK
$ git remote -v
origin  https://github.com/<username>/<新しいリポジトリ名>.git (fetch)
origin  https://github.com/<username>/<新しいリポジトリ名>.git (push)

これでおしまい。

おわりに

リポジトリ名変更すると、古いURLから新しいURLへのリダイレクトされるんだね、へ~

7
6
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
7
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?