47
40

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

git push originで複数箇所にプッシュする

Posted at

ターミナルから

$ git remote set-url --add origin hg@bitbucket.org:sasaplus1/dotfiles.git

とするか、もしくはテキストエディタで.git/configを開いて、

 [remote "origin"]
    fetch = +refs/heads/*:refs/remotes/origin/*
    url = git@github.com:sasaplus1/dotfiles.git
+   url = hg@bitbucket.org:sasaplus1/dotfiles.git

として保存すると良いかと。

これで

$ git push origin master

などとすると、複数箇所に同時にプッシュできます。
これで、新調したマシンをセットアップしている最中にGitHubがメンテナンス中になっても、同期してあるdotfilesをBitbucketからクローンしてくることができますねー。

47
40
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
47
40

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?