Skip to content

gcb coming up blank #428

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
3 tasks done
neil-sriv opened this issue Mar 27, 2025 · 3 comments
Open
3 tasks done

gcb coming up blank #428

neil-sriv opened this issue Mar 27, 2025 · 3 comments

Comments

@neil-sriv
Copy link

neil-sriv commented Mar 27, 2025

Check list

  • I have read through the README
  • I have the latest version of forgit
  • I have searched through the existing issues

Problem / Steps to reproduce

hey there, I'm having trouble with gcb on a new macbook set-up. Every other command seems to work but gcb always shows a blank screen even when git branch and git switch have valid options.

Any tips on debugging these kinds of things?

Image
@sandr01d
Copy link
Collaborator

Hey @neil-sriv, we'll need a bit of information to narrow down the issue. Have you configured anything in $FORGIT_CHECKOUT_BRANCH_BRANCH_GIT_OPTS? Could you please run the following command inside a git repository and let me know the output you get?

git branch --color=always --all | LC_ALL=C sort -k1.1,1.1 -rs

@neil-sriv
Copy link
Author

neil-sriv commented Mar 30, 2025

@sandr01d thanks for the reply!

branch opts

36> echo $FORGIT_CHECKOUT_BRANCH_BRANCH_GIT_OPTS
--sort=-comitterdate

command output

35> git branch --color=always --all | LC_ALL=C sort -k1.1,1.1 -rs
* (HEAD detached from bc0c17d)
  dev
  remotes/origin/HEAD -> origin/dev
  remotes/origin/dev
  neil/aws-migration/database
  neil/llm/generate-question
  remotes/origin/neil/llm/generate-question
  remotes/origin/neil/release-02.12.25.01
  remotes/origin/neil/ci-container-build
  remotes/origin/main
  remotes/origin/neil/test-fe-infra
  remotes/origin/neil/invite-ott-non-null
  remotes/origin/neil/reset-password
  remotes/origin/neil/release-10.10.24.01
  remotes/origin/neil/test-mergequeue-3
  remotes/origin/neil/spotigo-auth
  remotes/origin/neil/spotigo-container
  remotes/origin/neil/release-09.21.24.01
  remotes/origin/neil/migrate-react
  remotes/origin/neil/celery
  remotes/origin/neil/frontend-init
  remotes/origin/neil/backend-init
  remotes/origin/neil/readme

edit: also adding a note that this is consistent in both the default terminal app (macOS) and ghostty

@sandr01d
Copy link
Collaborator

Overwriting $FORGIT_CHECKOUT_BRANCH_BRANCH_GIT_OPTS like this removes the --all flag that is passed by default, as you can see here:

branch="$(git branch --color=always "${_forgit_checkout_branch_branch_git_opts[@]:---all}" | LC_ALL=C sort -k1.1,1.1 -rs |

This will result in remote branches being excluded. What you probably actually want instead is

export FORGIT_CHECKOUT_BRANCH_BRANCH_GIT_OPTS="--all --sort=-comitterdate"

This might not be the whole solution yet, because you should actually still be able to see local branches. I'm not entirely sure what the issue is yet, but let's give this a try and let me know how it goes. We'll see where to go from there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants