git-如何将遥控器分配为C驱动器中存在的现有本地存储库?
我完全在本地工作。我有一个现有的本地GIT存储库,我想将其推到一个裸露的存储库(用git Init -bare创建),该存储库也在我的笔记本电脑上本地存在。 Bare Repo和现有回购都存在于C:Drive和我使用Windows 10的同一文件夹系统中。
我在网上找不到任何用于添加本地仓库的遥控器的参考。通常,在线资源将GitHub或Azure作为远程回购URL。
我已经尝试过:
git远程添加Origin c:\ users \ myname \ oneDrive \ desktop \ mybarerepo
和
git Remote添加add oinct c:\ users \ myname \ oneDrive \ oneDrive \ desktop \ mybarerepo.git
and git and git and git and git and git and
git remote添加添加arount文件:// c:// c:// c:// c:// c:// c:// c:// c:// c:// c:// c:// c:// c:// \ users \ myname \ oneDrive \ desktop \ mybarerepo
和
git远程添加添加原点文件:// c:\ users \ myname \ oneDrive \ oneDrive \ desktop \ mybarerepo.git
and
git git git git git远程添加添加add oild file://///////////// \ OneDrive \ Desktop \ mybarerepo
和
git Remote添加原始文件://// c:\ users \ myname \ oneedrive \ desktop \ desktop \ mybarerepo.git,
我不确定是否是因为Git无法将本地位置作为远程位置,如果它是因为文件夹位于C驱动器中,则必须首先调整对文件夹的访问权限,如果它连接到OneDrive,或者是因为它的路径格式。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论