0

I accidentally created a copy of a repo with git clone --bare and now I can't update from the original repo. This GitHub article advises --mirror for updates:

If you want to mirror a repository in another location, including getting updates from the original, you can clone a mirror

git clone --mirror https://github.com/exampleuser/repository-to-mirror.git

How can I modify a --bare clone into a --mirror repo?

Randomblue
  • 112,777
  • 145
  • 353
  • 547
  • http://stackoverflow.com/questions/3959924/whats-the-difference-between-git-clone-mirror-and-git-clone-bare this might help you. – Chetna C Jan 27 '16 at 17:41
  • http://stackoverflow.com/a/21688931/5781248 gives the two commands needed – J.J. Hakala Jan 28 '16 at 22:46
  • @J.J.Hakala: `git fetch` fails with `fatal: Refusing to fetch into current branch refs/heads/master of non-bare repository` – Randomblue Feb 01 '16 at 09:43

0 Answers0