Git info is not shown inside a bare worktree git repo #6877
Unanswered
ahmedelgabri
asked this question in
Troubleshoot
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
When I work with worktrees, I usually do a bare clone. When I cd inside a worktree I don't see any git info, no branch, commit sha etc… nothing. Although it detects that it's a worktree but oddly enough doesn't detect that it's a bare repo.
Inside a worktree bare repo
Nothing is shown, only the branch icon
Compare this to my dotfiles repo, which is a regular repo
This is my config
{ "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", "blocks": [ { "alignment": "left", "segments": [ { "foreground": "7", "foreground_templates": ["{{if .Root}}1{{end}}"], "style": "plain", "template": "{{ if .SSHSession }}{{ .UserName }}@{{ .HostName }}{{ end }}", "type": "session" }, { "foreground": "242", "properties": { "style": "full" }, "style": "plain", "template": "{{ .Path }} ", "type": "path" } ], "type": "prompt" }, { "alignment": "left", "segments": [ { "foreground": "4", "properties": { "branch_ahead_icon": "<4>\u21e1 </>", "branch_behind_icon": "<4>\u21e3 </>", "branch_icon": " ", "fetch_status": true, "fetch_push_status": true, "fetch_bare_info": true, "fetch_upstream_icon": true, "github_icon": "", "disable_with_jj": true }, "style": "plain", "templates": [ "Bare?:{{ .IsBare }} ", "Worktree?:{{ .IsWorkTree }} ", "{{ .HEAD }}", "{{ if .Working.Changed }}<1>*</>{{ end }}", "{{ if .Commit.Refs.Remotes }}:<240>{{ join \", \" .Commit.Refs.Remotes }}</> {{ end }}", "{{ trunc 8 .Commit.Sha}} ", "{{ if .Commit.Refs.Tags }}{{ join \", \" .Commit.Refs.Tags }} {{ end }}", "{{ if gt .Jobs 0 }}<8>[{{.Jobs}}]</> {{ end }}" ], "type": "git" } ], "type": "prompt" }, { "alignment": "left", "segments": [ { "foreground": "3", "properties": { "style": "austin" }, "style": "plain", "template": " {{ .FormattedMs }} ", "type": "executiontime" } ], "type": "prompt" }, { "alignment": "left", "newline": true, "segments": [ { "foreground": "3", "foreground_templates": ["{{ if gt .Code 0 }}1{{ end }}"], "properties": { "always_enabled": true }, "style": "plain", "template": "{{random (list \"λ\" \"ϟ\" \"▲\" \"∴\" \"→\" \"»\" \"৸\")}} ", "type": "status" } ], "type": "prompt" } ], "console_title_template": "{{if .Root}}(Admin){{end}} {{.PWD}}", "transient_prompt": { "foreground": "3", "foreground_templates": ["{{ if gt .Code 0 }}1{{ end }}"], "template": "{{random (list \"λ\" \"ϟ\" \"▲\" \"∴\" \"→\" \"»\" \"৸\")}} " }, "version": 3 }Beta Was this translation helpful? Give feedback.
All reactions