LoginSignup
22
25

More than 5 years have passed since last update.

Gitのorginリモートから別のリモートに全てをpushする方法

Posted at

originのすべてを別のリモートにブランチ、タグを全てpushする時に少し困ったので
メモを取ります。


$ git clone --mirror git@hogehoge/hoge.git
$ git git remote add newrepo git@ageage/age.git
$ git push -f --tags newrepo refs/heads/*:refs/heads/*

これで、orginからnewrepoに全てpushする事ができます。

リポジトリ移行の時に使えますね!

22
25
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
22
25