0

I have some rails code that is hosted on a private github repo however I want to move that code to my own git server and do away with github. I have a server and git setup already, however if I do a git clone (github location) wouldn't that still be using github as a remote? What is the proper way to do this?

HelloWorld
  • 4,251
  • 8
  • 36
  • 60

1 Answers1

2

A git clone is a complete copy of the remote repository.

You can use git clone --mirror on your private server, in order to set up an exact mirror of the remote, followed by git remote rm origin to remove references to the original (however this is not necessary for it to function properly).

After this, all you have to do is clone the repo from your new, private source, instead of github.

(You can also use git clone --bare instead; Differences between --bare and --mirror are explained here).

Community
  • 1
  • 1
Sir Athos
  • 9,403
  • 2
  • 22
  • 23