Extract `grt`'s rebase target detection into a helper function
Make `gcf` work with unpushed branches