lakruzz / gh-phlow

This repository is a template for our default Github issues developer workflow in Praqma
3 stars 2 forks source link

git work-on failing #33

Closed JKrag closed 7 years ago

JKrag commented 7 years ago

When I run git work-on 21 I get the following error:

fatal: Cannot update paths and switch to branch '21-Reviewing-contrib-guide' at the same time.
Did you intend to checkout 'origin/' which can not be resolved as commit?
...
JKrag commented 7 years ago

I have debugged this problem and isolated it.

If you have cloned with https, and have a remote.origin.url in the form of https://github.com/Praqma/git-phlow.git, then the current alias fails as it calls git default-branchwhich in turn calls git hub-name.

hub-name assumes url's in the form: git@github.com:Praqma/git-phlow.git, only removes text before the : (and .git) and therefore returns //github.com/Praqma/git-phlow

I have found out that this can be easily fixed with an extra sed command.