UNC 路径上的 git [英] git on UNC path

查看:26
本文介绍了UNC 路径上的 git的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一台装有 Windows XP 的电脑,没有互联网连接,只能访问网络驱动器.我想在网络驱动器上设置一个 git 存储库,然后从我的本地存储库推送到它,这样我就可以在一天结束时去一台有互联网连接的计算机上从网络驱动器推送到 github.

我的问题是我无法从 git 访问网络驱动器.我把 PortableGit 放在网络驱动器上,但是 git-bash.bat 和 git-cmd.bat 死了,CMD 不支持 UNC 路径作为当前目录.".我尝试在 git-cmd.bat 中用pushd"替换cd",但它不起作用.

顺便说一句,我使用 PortableGit,因为我的机器没有管理员权限.

有什么想法吗?

解决方案

只要使用 UNC 路径 - git 不关心 cmd 能做什么和不能做什么.

<小时>

旧答案:将 UNC 路径绑定到驱动器号(或使用目录符号链接).

I have computer with Windows XP and no Internet connection, only access to network drive. I'd like to set up a git repository on the network drive and then push to it from my local repository, so I can at the end of the day go to a computer with Internet connection and push from network drive to github.

My problem is I cannot access network drive from git. I put PortableGit on the network drive, but git-bash.bat and git-cmd.bat die with "CMD does not support UNC paths as current directories.". I tried replacing "cd" with "pushd" in git-cmd.bat, but it doesn't work.

BTW, I use PortableGit since I don't have admin permissions on my machine.

Any ideas?

解决方案

Just use the UNC path - git doesn't care what cmd can and cannot do.


Old answer: Bind the UNC path to a drive letter (or use a directory symlink).

这篇关于UNC 路径上的 git的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆