git2r icon indicating copy to clipboard operation
git2r copied to clipboard

branch_get_upstream() doesn't work for local branch that has been pushed to remote

Open yli110-stat697 opened this issue 2 years ago • 0 comments

Hi,

I come across this observation that if I have a local branch, even though I have pushed it to remote on github using git command line, the branch_get_upstream() still doesn't work. To replicate this issue, I forked your repo and pushed a test branch with dummy commit. Below are my findings

Screen Shot 2023-07-03 at 9 57 23 AM Screen Shot 2023-07-03 at 9 58 03 AM

you can see that calling branches() I can clearly see one local branch test and one remote branch test, but branch_get_upstream() returned NULL.

Note: you cannot replicate this issue if you cloned a repo and checked out a remote branch, you have to create a local and then push to remote in terminial.

yli110-stat697 avatar Jul 03 '23 15:07 yli110-stat697