gitstatus
gitstatus copied to clipboard
Respect git config values for remote and pushRemote
When using the gh cli to checkout a PR from some repository, instead of adding the remote and then checking out the branch, it adds config entries for that specific branch telling git where pushes should go. Issue here is, that gitstatus (via powerlevel10k) isn't showing commits ahead or behind that remote/branch, probably because it doesn't know it has one cause its not checking the local git config.
What do I need to do to reproduce this?
Have a GitHub repo that has an open PR from a fork, not a different branch in the same repo. Then use the GitHub cli tool to checkout that pr, so gh pr checkout ####. You can then add a commit. gitstatus should say you are 1 ahead, but it doesn’t. And a git push succeeds in pushing to the branch the PR is from.
after checking out the branch with the gh CLI tool, you can also look at the local git config git config —edit to see how it configures the remote for that specific branch.
I might take a look at it but not soon. Maybe in a month or two.
If you can provide more specific instructions (commands I can run, which don't require gh and don't use Internet), it'll speed things up considerably.
Closing because I don't intend to do anything here.