A git clone is set up to support pushing/pulling back into the original repository. How do I use git-remote (and/or other commands, configuration files, etc.) to change the two repositories such that the original will now act like the clone, pushing and pulling into it by default, and the clone will now act as the original, with no knowledge of the clone?
git clone --mirror In addition, --mirror will clone all the extended refs of the remote repository, and maintain remote branch tracking configuration. You can then run git remote update on the mirror and it will overwrite all refs from the origin repo.
Issue these commands on what used to be the remote:
% git remote add origin user@machine:/path/to/repo
% git config branch.master.remote origin
% git config branch.master.merge refs/heads/master
% git pull
Then on the old clone:
% git remote rm origin
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With