How to add a local repo and treat it as a remote repo

I’m trying to make a local repo act as a remote with the name bak for another local repo on my PC, using the following:

git remote add /home/sas/dev/apps/smx/repo/bak/ontologybackend/.git bak

which gives this error:

fatal: '/home/sas/dev/apps/smx/repo/bak/ontologybackend/.git' is not a valid remote name

I’m trying to sync two local repos, with one configured as a remote named bak for the other, and then issuing git pull bak.

What is the best way to do it?


Edit:

Sorry, silly me, I’ve just realized the remote add should be:

git remote add bak /home/sas/dev/apps/smx/repo/bak/ontologybackend/.git

the name of the remote goes before the address.

4 Answers
4

Leave a Comment