New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/gb conflicts with git branch alias #4

Closed
xiocode opened this Issue Apr 28, 2015 · 8 comments

Comments

Projects
None yet
4 participants
@xiocode

xiocode commented Apr 28, 2015

No description provided.

@davecheney

This comment has been minimized.

Contributor

davecheney commented Apr 28, 2015

Im sorry to hear that, I am not planning on changing the name of the tool at the moment, you could rename gb to something else to work around this.

@davecheney davecheney closed this Apr 28, 2015

@davecheney davecheney added the wontfix label Apr 28, 2015

@elithrar

This comment has been minimized.

elithrar commented Apr 28, 2015

This is usually an issue with the oh-my-zsh git plugin, and not a standard git install.

If you alias gb=$GOPATH/bin/gb after the git plugin is imported it will solve it. Or fork the git plugin and remove the alias.

@xiocode

This comment has been minimized.

xiocode commented Apr 29, 2015

@elithrar thank u

@davecheney davecheney changed the title from name was conflict with git branch's alias to cmd/gb conflicts with git branch alias May 6, 2015

@davecheney

This comment has been minimized.

Contributor

davecheney commented May 6, 2015

I've had a second report of this issue so I want to reopen the bug for discussion.

The core problem appears to be that some shells and installers (for git I think) create alias gb=git something in the user's shell. Annoyingly the user has probably never even used this alias, so are very confused when after installing gb, it acts like a broken git command.

The solution is to rename gb, possibly to gbt, go build tool. This would also resolve #11

However I am not proposing that at this time, I would like to leave this issue open for others to comment so I can get a feel for just how big of an issue this potential conflict is.

/cc @wkennedy

@davecheney davecheney reopened this May 6, 2015

@demizer

This comment has been minimized.

Contributor

demizer commented May 14, 2015

I ran into this today with the prezto config framework for ZSH. All I had to do to fix it was to rename the aliases from gb* to gbr*. It was easy for me because I have forked the prezto repo, but the standard install procedure for most ZSH config frameworks is to clone it into $HOME, which would make the situation a little more complicated.

Renaming the gb command is not necessary; users should update their aliases.

@elithrar

This comment has been minimized.

elithrar commented May 14, 2015

For posterity: echo "alias gb=$GOPATH/bin/gb" >> $HOME/.zshrc && source $HOME/.zshrc should do the trick for most where an existing alias
conflicts with gb.

As per my other comment, one of the most common causes is the "git" plugin
for oh-my-zsh which defines a LOT of git-related aliases that you'll never
know about unless you dig through the output of alias.

(I also wouldn't rename the tool either!)

On Thu, May 14, 2015 at 6:19 AM Jesus Alvarez notifications@github.com
wrote:

I ran into this today with the prezto config framework for ZSH. All I had
to do to fix it was to rename the aliases from gb* to gbr*. It was easy for
me because I have forked the prezto repo, but the standard install
procedure for most ZSH config frameworks is to clone it into $HOME, which
would make the situation a little more complicated.

Renaming the gb command is not necessary; users should update their
aliases.


Reply to this email directly or view it on GitHub
#4 (comment).

@davecheney

This comment has been minimized.

Contributor

davecheney commented May 14, 2015

Can someone include the output they see when oh my zsh takes over, I'll write a fan entry and close this issue.

On 14 May 2015, at 18:25, Matt Silverlock notifications@github.com wrote:

For posterity: echo "alias gb=$GOPATH/bin/gb" >> $HOME/.zshrc && source $HOME/.zshrc should do the trick for most where an existing alias
conflicts with gb.

As per my other comment, one of the most common causes is the "git" plugin
for oh-my-zsh which defines a LOT of git-related aliases that you'll never
know about unless you dig through the output of alias.

(I also wouldn't rename the tool either!)

On Thu, May 14, 2015 at 6:19 AM Jesus Alvarez notifications@github.com
wrote:

I ran into this today with the prezto config framework for ZSH. All I had
to do to fix it was to rename the aliases from gb* to gbr*. It was easy for
me because I have forked the prezto repo, but the standard install
procedure for most ZSH config frameworks is to clone it into $HOME, which
would make the situation a little more complicated.

Renaming the gb command is not necessary; users should update their
aliases.


Reply to this email directly or view it on GitHub
#4 (comment).


Reply to this email directly or view it on GitHub.

@elithrar

This comment has been minimized.

elithrar commented May 14, 2015

~ gb
fatal: Not a git repository (or any of the parent directories): .git
~ which gb
gb: aliased to git branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment