ahmedjama.com

networking | automation | clouds

How to duplicate a Git repo

Duplicate a Git repo without forking it

Ahmed Jama

1-Minute Read

git

Sometimes you will want duplicate a repository without forking it. The process from was taken from the GitHub documentation pages at https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/duplicating-a-repository.

Linux/Mac

Open up terminal.

$ git clone --bare https://github.com/exampleuser/old-repository.git

$ cd old-repository.git

$ git push --mirror https://github.com/exampleuser/new-repository.git

$ cd ..

$ rm -rf old-repository.git

Say Something

Comments

Nothing yet.

Recent Posts

categories

About

Welcome to ahmedjama.com. I am a network engineer and I use this blog to write about computer networking topics, automation, security and clouds.