Git - How to Duplicate a Repository with History ( Full duplicate, no fork)

preview_player
Показать описание
How to duplicate a repository and it's history to another new repository. It's a full duplicate / copy, not a fork.

Instructions:
If you already have a copy of the repo, skip to next step.
2. CD (Change Directory) into the cloned repo
3. Copy the git clone url of your new repo.

🎵 Track Info
––––––––––––––––––––––––––––––
Creative Commons — Attribution 3.0 Unported — CC BY 3.0
––––––––––––––––––––––––––––––
Рекомендации по теме
Комментарии
Автор

Been searching for this, you a life saver

sphelelephumlani
Автор

Thanks a lot. I get a problem though. In GitHub the repository is actually correct -also with feature branches. But afterwards when I clone the repo to a computer (just regular git clone URI), then when I run "git branch" only the main branch appears. I can actually checkout a feature anyway "git checkout nameOfFeatureBranch", and then it appears and the files are there.
It's just spooky. Do you know how to fix this issue?

Infinitesap
Автор

What if there are different GitHub account. I want to copy or move all my repositories from my old GitHub account to my new GitHub account. I have used transfer but that requires my old GitHub account as collaborator. Do you have any other solution

Jinay.Kothari
Автор

well what I want to do is keep git history of old project and copy it into fresh new project folder with different folder structure than the old project. Is it possible? Will it affect my new codes in any way?

roopsoops