LoginSignup
12

More than 5 years have passed since last update.

posted at

updated at

githubにpushする際のoriginを変更する方法

githubのpush先レポジトリを変更したい場合、
addコマンドではなくset-urlコマンドを使ったほうが好ましい。

git remote set-url <リポジトリの名前> <新しいリポジトリのURL>

例:

git remote set-url origin https://github.com/hogehoge/fugafuga.git

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
What you can do with signing up
12