Safe version on command line, without need to rewriting origin, for public or private repository.
Create a new repository on github eg: "my-repo-copy"
# Run the command
git clone https://github.com/myprofil/my-repo-copy.git
# The url can be found on the repository, click the button code and https.
# You now have a empty folder my-repo-copy.
# Inside the folder my-repo-copy, run:
git clone https://github.com/myprofil/my-repo-original.git
# You now have a folder my-repo-original, go inside and copy all files/folders except .git
# Go in the folder my-repo-copy and paste, delete the folder my-repo-original
# Run
git add .
git commit -m "clone my-repo-original"
git push origin main
# If you'r branch name is main and you want to be master, after the commit, run
git checkout -b master
git push origin master