Git从其他用户的工作目录中拉出 [英] Git pull from another users working directory

查看:84
本文介绍了Git从其他用户的工作目录中拉出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以使用其本地IP地址从其他用户的工作目录中提取特定文件或更改?

Is it possible to pull specific files or changes from another users working directory using thier Local IP address?

例如

git pull http://192.168.1.101/sandbox/somefile.php

应该注意,两个用户都在使用Windows XP.

It should be noted that both users are using Windows XP.

谢谢

P.

推荐答案

感谢Rup的回答和eckes的回答,到目前为止,我已经提出了以下建议:

Thanks to the response of both Rup's answer and eckes's answer, I've come up with the following so far:

您需要知道用户PC 192.168.x.x的IP地址(这将在下面的示例中),然后您需要在Windows XP中共享该文件夹.

You'll need to know the IP address of the users PC 192.168.x.x (this will be the in the example below) and then you'll need to share the folder in Windows XP.

  1. 右键单击要在用户PC上共享的所需文件夹,然后选择属性".
  2. 选择共享"标签.
  3. 选择共享此文件夹",然后为该文件夹命名.这将是下面的示例.
  4. 单击确定".

在您的PC上,您需要一个已初始化且为空的git存储库,以便在拉动之前添加新的遥控器.

On your PC you need to have an initialised and empty git repository for you to add the new remote before you pull.

示例:

git init
git remote add <alias> //<ip_address>/<shared_folder_name>
git pull <alias> <branch>

上述问题是它将复制共享文件夹的全部内容.我仍在寻找从其他用户工作目录中提取个人文件的方法.

The problem with the above is that it will copy the entire contents of the shared folder. I am still looking for a way to pull an individial file from another users working directory.

这篇关于Git从其他用户的工作目录中拉出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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