将Git项目推送到本地目录 [英] Push Git Project to Local Directory

查看:185
本文介绍了将Git项目推送到本地目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

不知道在Git中是否完全支持它,如果它可以使事情变得简单,基本上我有一个项目正在X文件夹中工作,并且当我将它放到特定的阶段I时想再次将它推到我的电脑上的文件夹Y.

Don't know whether this is fully supported in Git would be excellent if it is as it could make things a lot easier, basically I have a project am working on in folder X and when I get it to a particular stage I want to push it to folder Y on my computer again.

如果这可能很好,那么更好的是,无论是GitHub for Mac还是Tower for Mac都可能。

If this is possible great, what would be evener better is whether it is possible with either GitHub for Mac or Tower for Mac.

推荐答案

这是完全可能的 - 您可能想要做的是在Y文件夹中创建一个裸 c $ c> git init --bare ),然后将该文件位置添加为远程文件:

It is absolutely possible - what you probably want to do is create a "bare" git repository in folder Y (git init --bare) and then add that file location as a remote:

git remote add Y file:///path/to/Y

我假设GitHub for Mac或塔的Mac会像任何其他遥控器一样处理。

I assume GitHub for Mac or Tower for Mac would handle this like any other remote.

这篇关于将Git项目推送到本地目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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