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?

Marcin Kapusta
  • 5,076
  • 3
  • 38
  • 55

1 Answers1

0

If the git push in the local repository 1 succeeded, then the remote should be on the remote repository. After fetching in your local repository 2, the branch should appear in the branch list by git branch -r (or git branch -a) as a remote branch, named origin/dev. If that is not the case, then you either didn’t fetch correctly or the remote repository actually does not have that branch.

Do you have any access to the remote repository (web interface, shell access etc.) to confirm that the branch is actually there?

poke
  • 369,085
  • 72
  • 557
  • 602
  • Yes the git push succeeded and I have shell access to remote repo and I confirm that there is this new branch on remote. I execute on this remote shell "git branch" and I see this new branch. – Marcin Kapusta Feb 27 '13 at 07:35