如何在git仓库中获取新的子目录?

问题描述

git存储库ArduPilot在ardupilot / libraries / SITL / examples /中有一个新的子目录,新目录是JSON。当我克隆存储库时,该目录不存在,并且不在我的本地副本中。我该使用什么命令来更新本地存储库以匹配远程存储库?

这是本地状态

$ git status
On branch master
Your branch is up to date with 'origin/master'.
nothing to commit,working tree clean

但是,我可以在github页面上看到新目录。

解决方法

我必须做“ git fetch origin”,而不是“ git fetch”或“ git pull”。