Home > Blockchain >  How to simply duplicate my own Github repo?
How to simply duplicate my own Github repo?

Time:12-30

I am using github just to host some public gptChat prompts I have created, and I plan to create more based off of these. I want each variation that I make to have its own direct link, its own readme, etc. But github famously does not allow forking of your own repo.

I am not doing any software/code development here, just working with plain text for chatGPT. I am using no local repository, github is merely a nice place to host such information for people to copy and use for themselves. Since I am using no local tools, all this branching & merging stuff I read about doesn't seem like it will apply at all. I'm not very familiar with git or github, I have had developers use it before on projects I was involved with, but all I personally ever have done with it is download binaries, text, etc.

How can I effectively duplicate my own existing repo so that I can begin work by making the changes I need to make, to the "template" version?

CodePudding user response:

It sounds like you are looking for the Repository Template feature of github. In the repo you want to use as a template, open the settings and mark the repo as a template.

enter image description here

Each time you want a copy of that repo, click the Use Template button on the code tab to create a copy of the repo with a new name:

enter image description here

enter image description here

CodePudding user response:

There are actually two ways. The first one will keep the "history" of change of your old repository

  1. Go to your old repository, click on the green button that says "code", go to the HTPPS tab and copy the link
  2. Create a new repository, make sure that the Add a README file is not checked, this is very important
  3. Now that you are in the new repository, go all the way down and click on "Import code"
  4. Now paste the link you have copied earlier and click on "Begin import", wait for a few seconds and the process is finished.

The second way will not keep the "history" and it is way more time consuming. If you want to tell you, just comment

  • Related