ahmedjama.com

Tech | Insights | Inspiration

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

This blog is a space for exploring both the technical and thought-provoking aspects of technology, sharing insights and breaking down complex concepts in an accessible and engaging way.