I am working entirely locally. I have an existing local git repository that I would like to push to a bare repository (created with git init --bare) that also exists locally on my laptop. Both the bare repo and existing repo exist within the same folder system in c: drive and I am using windows 10.
I cannot find any references online that have worked for adding a remote that is a local repo. Typically online sources reference GitHub or azure as the remote repo URL.
I have tried:
git remote add origin c:\Users\MyName\OneDrive\Desktop\MyBareRepo
and
git remote add origin c:\Users\MyName\OneDrive\Desktop\MyBareRepo.git
and
git remote add origin file://c:\Users\MyName\OneDrive\Desktop\MyBareRepo
and
git remote add origin file://c:\Users\MyName\OneDrive\Desktop\MyBareRepo.git
and
git remote add origin file:////c:\Users\MyName\OneDrive\Desktop\MyBareRepo
and
git remote add origin file:////c:\Users\MyName\OneDrive\Desktop\MyBareRepo.git
I am not sure if it is because git just cannot utilize a local location as a remote, if its because the folder is located in c drive, if I must first adjust the access rights to the folder, if its because its connected to onedrive, or if because of the path format.