wfxr / forgit

:zzz: A utility tool powered by fzf for using git interactively.
MIT License
4.33k stars 136 forks source link

Proposal to fix the checkout branch when a local branch exists and contains slashes in its name #163

Closed crazy-matt closed 2 years ago

crazy-matt commented 2 years ago

Check list

Description

The last change introduced in order to track a remote branch create a bug when the branch name contains slashes and the branch already exists locally.

Type of change

Test environment

dides82 commented 2 years ago

Hi, I had the same behavior: impossible to track a remote branch (I would end up in detached HEAD) and impossible to checkout local branches with slashes (it would create a new branch tracking my local branch 😒). This fix solves the problem for me 👍 Thanks

wfxr commented 2 years ago

@crazy-matt Sorry for the too late reply. I tested it and it worked fine. Thanks for your contribution!