Tenía esta necesidad. Quería crear una copia exacta de un sitio web existente y ponerlo en un subdominio, como un archivo.
Ahora, este sitio está bajo control de versiones y quería conservar elGithistory sino también implementarlo en un nuevo repositorio de GitHub, por lo que podría implementarlo por separado, ahora ambos sitios podrían seguir su propio destino.
El sitio web es un sitio de Hugo, así que simplemente copié la carpeta del sitio web en una carpeta separada y eso fue todo, localmente.
Así que entré en la carpeta del sitio copiado en la terminal y ejecuté
git remote -vthis listed the existing GitHub repository as the “origin” remote.
I ran:
git remote rm originThis 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:
- A Git Cheat Sheet
- Git workflow to manage work on multiple branches
- An easy way to handle Git subrepositories
- An incomplete list of great Git tutorials
- A developer's introduction to GitHub
- The complete Git guide
- How to discover a bug using git bisect
- How to make your first Pull Request on GitHub
- How to update a Git branch from another branch
- I posted my password / API key on GitHub
- Squashing Git commits
- How to remove a Git remote