当我获得git pull存储库信息时,我的所有存储库文件夹最终都位于用户的根文件夹中。相反,我希望git将每个存储库拉到一个具有存储库名称的文件夹中,但是在我的用户根目录中有一个名为git-repositories的文件夹。
我尝试了cd'ing到~/git-repositories/blogger-templates (blogger-模板是回购名称),然后运行。
git pull https://github.com/blue-ice/blogger-templates但是存储库中的所有文件夹最终都位于我的根文件夹中。我怎样才能让他们进入~/git-repositories/blogger-templates
发布于 2014-05-11 07:36:06
访问github回购组织网页:
https://github.com/blue-ice/blogger-templates在右边的栏中,您将看到以下内容:
SSH Clone URL
git@github.com:blue-ice/blogger-templates.git第一次从GitHub检索存储库时,您希望使用git clone
git clone git@github.com:blue-ice/blogger-templates.git在最初的git clone之后,您可以使用git pull,并且事情会像您预期的那样运行。
发布于 2014-05-11 07:17:13
似乎您已经在您的家庭dir中创建/克隆了一个回购程序。运行git clone url_to_remote path_where_you_want_your_local。现在,git pull将更新您在第二个参数中提供的路径中的文件(请注意,您必须在本地回购目录中才能提取)。同时,将.git dir从您的家中移除也会更好。
https://stackoverflow.com/questions/23587920
复制相似问题