0

I have one remote repository and two working dirs. Both are setup with this one remote repository.

From working DIR_1 I make push from branch dev like that:

git push origin dev

Next when I'm on working DIR_2 I would like to get the reference to this new remote branch dev. So I enter the following:

git fetch origin # To update and fetch new remote branches
git branch -a # To list all branches (local and remote) that my local git see

Now I have problem because git fetch didn't see the new remote dev branch. Can somebody help me with that. I'am doing something wrong. When I switch to remote machine and execute command:

git branch

Then I see this dev branch. What to do?

4

1 回答 1

0

如果git push在本地存储库 1 中成功,那么远程应该在远程存储库上。在本地存储库 2 中获取后,该分支应以git branch -r(或git branch -a)作为远程分支出现在分支列表中,名为origin/dev. 如果不是这种情况,那么您要么没有正确获取,要么远程存储库实际上没有该分支。

您是否有权访问远程存储库(Web 界面、shell 访问等)以确认该分支确实存在?

于 2013-02-27T07:25:34.737 回答