15

For newer version: detach commits view

Outdated:

UPDATES:

  1. The initial issue was due to me not having the Gitlens extension active in that workspace
  2. As of Nov 2024, Gitlens have updated the extension grouping the sections. See the response by Matty for guidance on how to fix this

Problem:

When I open the Source Control panel in VScode, normally I am able to see any diffs and at the bottom of the panel I can open/close various tabs such as Commits, Branches, Remotes etc. These tabs have all disappeared for a specific repo.

Here is how it should look:

  • The tabs are available at the bottom of the panel
  • I am able to select/unselect which tabs to show from the three dot menu

However, they are not showing on this specific repo. Here's how it looks on the repo in question:

  1. I can't see the tabs at the bottom of the panel
  2. I am unable to show/hide them from the three dot menu

Notes:

  • I have checked VScode settings and both the user and workspace settings are exactly the same
  • A git repo exists in this directory (the tabs used to show fine)
  • I do not want to do this from the command line
3
  • I don't have or use VSCode, so I can't answer that part, but I can tell you for sure that Git isn't actually involved here (other than providing a repository). Commented Dec 29, 2021 at 2:54
  • Yup agreed, this must be a VScode issue. The full history etc is available on the command line Commented Dec 30, 2021 at 18:36
  • Started new project and VS Code looks default, including OP. Looks like that this all is stored in Profile: File→Preferences→Profiles→Custom (worked for me). Commented Aug 26, 2023 at 11:10

9 Answers 9

12

after an update here is the new way to find these settings

  1. in settings I typed @ext:eamodio.gitlens source
  2. then I un-checked the Group the <VIEW_TYPE> view

image of settings page

OR simply...

quickest way to fix

Sign up to request clarification or add additional context in comments.

Comments

9

For me the issue was I hadn't setup the extension properly, go to the extension's page -> Settings -> Get Started -> Open Quick Setup -> Views -> Source Control Layout

Step By Step Image

2 Comments

You should complete your answer by adding what the user should do once they've opened 'Source Control Layout'
Sorry if it wasn't obvious, Source Control Layout is a button on the Views screen to enable the commits view
9

When the GitLens extension is disabled, it shows only "Changes". You can go to, Extentions > Settings wheel of GitLens > Enable.

It will enable (COMMITS, FILE HISTORY, BRANCHES, REMOTE, STASHES) in Source Control.

Comments

5

It was down to not having Gitlens enabled in the workspace 😬

Comments

1

for me, it happened because the extension 'Git lens' wasn't installed in WSL but installed in windows so that it couldn't see the .git folder.

installing GitLens in WSL resolved the problem

Comments

0

Not sure, but 1) check your remote repositories to ensure they look normal. 2) Have any extensions changed recently (GitLens, Git History, etc.), or 3) Maybe the .git directory got moved/hosed somehow???

1 Comment

1) they look fine 2) none but I tried reactivating them all just in case. It works in other VScode repos with the exact same VScode settings 3) still there and has the same files/structure as other repos which show the tabs fine. Thanks for the response though
0

For WSL users, you have to install the extensions INSIDE WSL, just go to the extensions tab and click "Install in WSL" for your extensions

Comments

0

I had the same issue, with the Source Control view that displayed the changed files but without the Repositories, Commits, Branches, etc. tabs.

The problem is that I shared the git folder under Samba directly, while I had to share the parent one to be able to show those tabs.

For example, if you git directory is /home/myuser/myfolder and you share myfolder with Samba and open it with VS Code on another PC, the Commits tab won't show. You'll have to share myuser instead and then in VS Code open the myuser/myfolder directory.

Comments

0

I had found the branch name was "too long" as it was auto generated by a template from a Gitlab issue. Have a look in the VS Code git using the command Git: Show Git Output and check it for too long. In case it's this issue: use shorter branch name(s).

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.