git-如何将遥控器分配为C驱动器中存在的现有本地存储库?

发布于 2025-02-12 03:29:54 字数 1008 浏览 1 评论 0原文

我完全在本地工作。我有一个现有的本地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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文