你如何克服一个Git仓库到一个特定的文件夹? [英] How do you clone a Git repository into a specific folder?
问题描述
执行命令 git clone git@github.com:whatever
在当前文件夹中创建一个名为whatever的目录,并将Git存储库的内容放入该文件夹中:
/ httpdocs / whatever / public
我的问题是,我需要克隆到当前目录的Git存储库的内容,以便它们出现在Web服务器的正确位置:
/ httpdocs / public
我知道如何在克隆存储库后移动文件,但这似乎打破了Git,我希望能够通过调用 git pull
来进行更新。
选项A:
git clone git@github.com:任何文件夹名称
选项B: 也移动.git文件夹。 更好: 将您的工作副本保存在其他地方,并创建一个符号链接。 Executing the command My problem is that I need the contents of the Git repository cloned into my current directory so that they appear in the proper location for the web server: I know how to move the files after I've cloned the repository, but this seems to break Git, and I'd like to be able to update just by calling Option A: Option B: move the .git folder, too. Better yet: Keep your working copy somewhere else, and create a symbolic link. 这篇关于你如何克服一个Git仓库到一个特定的文件夹?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
git clone git@github.com:whatever
creates a directory in my current folder named whatever, and drops the contents of the Git repository into that folder:/httpdocs/whatever/public
/httpdocs/public
git pull
. How can I do this?git clone git@github.com:whatever folder-name