如何从存储库复制/复制所有github远程分支 [英] how to copy/duplicate all github remote branches from a repository

查看:189
本文介绍了如何从存储库复制/复制所有github远程分支的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个旧的github存储库

如果您点击导入代码,您可以提供旧git存储库的网址:



然后,您必须点击屏幕底部的开始导入。 GitHub会发现这是一个git版本库,并且会做一个完美的克隆: /i.stack.imgur.com/lg3jz.jpgrel =nofollow noreferrer> 然后,您可以检查:您的旧存储库的所有提交,分支,标记都可以在新的存储库中使用。

I have a old github repository https://github.com/oldRepository which has many remote branches

  • master
  • branch1
  • branch2
  • branch3

I want to copy or duplicate all these branches in one shot to the new github repository https://github.com/newRepository instead of duplicating/copying only one at a time. How Do I do this?

解决方案

The easiest way would be to create a new empty repository in your GitHub profile. GitHub then displays several options for populating this repository. The last one is an importing option:

If you click on import code, you have the opportunity to give the url of your old git repository:

You then have to click on Begin import at the bottom of the screen. GitHub will figure out that's a git repository and will make a perfect clone:

You can then check: all your commits, branches, tags of your old repository will be available in the new repository.

这篇关于如何从存储库复制/复制所有github远程分支的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆