【发布时间】:2023-02-02 19:53:59
【问题描述】:
我尝试使用命令 pull 从 github 上的远程存储库拉取到本地目录。输出似乎是正确的,但是没有任何反应。
我的电脑是 Macbook Air M1 2020,16GB。
当我在终端上添加一个新的远程存储库时,它显然有效。我是这样做的:
cd "local-dir-source"
git init
git remote add origin "remote-repo-source.git"
git remote -v
这是输出:
origin "remote-repo-source.git" (fetch)
origin "remote-repo-source.git" (push)
而且,当我尝试拉动时,终端上的输出是正确的:
remote: Enumerating objects: 93, done.
remote: Counting objects: 100% (93/93), done.
remote: Compressing objects: 100% (50/50), done.
remote: Total 93 (delta 26), reused 74 (delta 16), pack-reused 0
Unpacking: 100% (93/93), 20.18 KiB | 148.00 KiB/s, done.
From "remote-repo-source"
* [new branch] master -> origin/master
* [new branch] testing -> origin/testing
There is no tracking information for the current branch.
Specify the branch you want to merge by.
See git-pull(1) for more details.
git pull <remoto> <branch>
If you want to set tracking information for this branch you can do it with:
git branch --set-upstream-to=origin/<branch> master
但是,在本地目录中,远程仓库中的文件不会出现。
我也试过fetch和merge,问题是一样的。他们显然工作得很好,但没有任何反应。
【问题讨论】:
-
And, when I try to pull...您使用什么确切的命令从哪个分支中提取?
标签: git github merge fetch pull