使用 git repo 中的新内容更新本地文件夹

Nem*_*emo 4 github git-bash

我在我的 git bash 中使用这个命令将一个 git repo 克隆到我的电脑中

git clone https://github.com/xxx/yyy.git
Run Code Online (Sandbox Code Playgroud)

它在我的电脑中创建了一个名为 yyy 的文件夹。

如何使用https://github.com/xxx/yyy.git 的新内容更新我电脑中的文件夹 yyy (它是否称为远程仓库)?

我按照使用 Github 存储库中的更改更新本地存储库中的说明进行操作,特别是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.gitgit pull https://github.com/xxx/yyy.git必须工作,否则 git 语法不是很好。

我应该再次“克隆”以覆盖我电脑中的现有文件夹吗?为什么我不能“拉”?

mc1*_*rke 7

您需要从克隆的存储库中发出 git 命令:

cd yyy
git pull
Run Code Online (Sandbox Code Playgroud)


Sam*_*Sam 3

您可能是从 yyy 文件夹外部执行此命令。你必须先进入它:

cd yyy
git pull
Run Code Online (Sandbox Code Playgroud)