我在git bash中使用以下命令将一个git存储库克隆到我的pc中。
git clone https://github.com/xxx/yyy.git它在我的电脑里创建了一个名为yyy的文件夹。
如何使用https://github.com/xxx/yyy.git的新内容更新pc中的yyy文件夹(是否称为远程回购)?
我遵循了Updating a local repository with changes from a Github repository中的说明,特别是git pull origin master,但它们都不起作用,并返回了错误$ git pull origin master fatal: Not a git repository (or any of the parent directories): .git。
我也尝试了git pull https://github.com/xxx/yyy.git,因为我推断如果我成功地做了git clone https://github.com/xxx/yyy.git,git pull https://github.com/xxx/yyy.git必须工作,否则git语法不是很好。
我是否应该再次进行“克隆”以覆盖我pc中的现有文件夹?为什么我不能做“拉”?
发布于 2019-03-18 16:17:06
您需要从克隆的存储库中发出git命令:
cd yyy
git pull发布于 2019-03-18 16:17:01
您可能是从yyy文件夹外部执行此命令。你必须先进入其中:
cd yyy
git pullhttps://stackoverflow.com/questions/55216983
复制相似问题