1

When I run following commands in my vs code dev container:

git fetch --all
git branch -a

I don't see any new branches. Only the master branch and my own created branch. When I run the exact same commands in a stand alone terminal on mac I do get all my branches. Could this be something with ssh keys? I also tried disabling GitLens extension and restarting vscode but that didn't work.

sg_sg94
  • 2,248
  • 4
  • 28
  • 56
  • This fixed my problem: https://stackoverflow.com/questions/11623862/fetch-in-git-doesnt-get-all-branches#comment15394706_11623862 – sg_sg94 Mar 22 '21 at 11:57

1 Answers1

0

I just tried with a VSCode remote SSH session, and it does work.

In your case, it should be related to git remote -v: maybe the origin is not set, or different from the same cloned repository on your Mac.

You can also test git ls-remote in your remote SSH session repository in VSCode Terminal, to check you can list the remote HEAD SHA.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250