How to delete the Git remote

I have this need. I want to create an exact copy of an existing website and place it in a subdomain as an archive.

This site is now under version control and I want to keepGitHistory, but also deployed it to the new GitHub repository, so I can deploy it separately, and now both sites can do things as they want.

The website is a Hugo website, so I just copied the website folder to a separate folder, which is local.

So, I entered the replication site folder in the terminal, and then I ran

git remote -v

this listed the existing GitHub repository as the “origin” remote.

I ran:

git remote rm origin

This removed the origin remote, so running git remote -v didn’t return anything any more.

Now since I use GitHub Desktop I just dragged the folder in that app, and I was able to create a new, different GitHub repository from there.


More git tutorials: