Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I delete a GitHub repository and then switch my CNAME file to a different repository?

I want to delete my repository on GitHub that contains my personal portfolio website and create a new repository with a new personal portfolio that I created. Can I simply delete the old one and then when I create the new one, the CNAME doc will still be able to be used? Or must the CNAME doc stay with the old repo?

I am just learning some coding on the side, and I don't want to make some huge mistake deleting things.

like image 449
dancemc15 Avatar asked Oct 19 '22 09:10

dancemc15


1 Answers

Yeah it will.

But just don't delete things right away. Rather change the old repository name a bit (Going to Settings -> Under the Repository Name heading -> Rename), like adding a "-old" or something. Also change slightly the "url" in the old CNAME file. But let the files and folders be on their place.

And then add the desired CNAME file to the new repository. This way even if (I am not saying it will and I have done this quite a few time now) something breaks momentarily, in seconds you can fix it immediately by reverting the original names back both in your old repo and CNAME file.

Hope it helps.

like image 122
Suman Barick Avatar answered Nov 12 '22 22:11

Suman Barick