How To Create a New git Repo from an Existing git Directory
erics, April 24th, 2020
I needed to take a directory which had already run git init and needed to create the remote origin on our main internal git server.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
ssh git@gitserver cd ~git mkdir myrepo cd myrepo git --bare init exit cd myproject git push ssh://git@gitserver/home/git/myrepo +master:master cd .. mv myproject myproject.orig git clone ssh://git@gitserver/home/git/myrepo myproject cd myproject |