简体   繁体   English

我克隆了一个git存储库。 如何从中拉入工作目录?

[英]I cloned a git repository. How do I pull from it into a working directory?

So I cloned an existing (and working) Git repository, for the purpose of experimenting with the clone (instead of pushing stuff into the live production repo). 所以我克隆了一个现有的(和工作的)Git存储库,目的是试验克隆(而不是将东西推送到实时生产仓库)。

在此输入图像描述

It went without incident but now I would like to create a Working Directory to which I can pull from (and from which I can push to) the new "remote" repository I just created (cloned). 它没有发生任何事故,但现在我想创建一个工作目录,我可以从中提取(我可以从中推送)我刚创建的新“远程”存储库(克隆)。

How do I do that? 我怎么做?

I tried pulling to an empty directory with the help of Git Extensions , but all I get in the context menu are operations that do not seem like what I need: 我尝试在Git Extensions的帮助下拉到一个空目录,但我在上下文菜单中得到的所有操作都不像我需要的操作:

在此输入图像描述

Obviously, I am missing a key Git concept here. 显然,我在这里错过了一个关键的Git概念。 What am I missing? 我错过了什么?

You have selected the --bare option ("Public repository, no working dir"). 您已选择--bare选项(“Public repository,no working dir”)。 This option does not create a working directory. 此选项不会创建工作目录。 Instead, choose the "Personal repository" option, which creates a working directory. 而是选择“个人存储库”选项,该选项可创建工作目录。

在克隆时,您应该选择存储库类型的“个人存储库”选项来创建工作目录。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM