Skip to content
This repository has been archived by the owner on Mar 6, 2020. It is now read-only.

cmd/gb conflicts with git branch alias #4

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

cmd/gb conflicts with git branch alias #4

xiocode opened this issue Apr 28, 2015 · 8 comments

Comments

@xiocode
Copy link

xiocode commented Apr 28, 2015

No description provided.

@davecheney
Copy link
Contributor

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.

@elithrar
Copy link

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
Copy link
Author

xiocode commented Apr 29, 2015

@elithrar thank u

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

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
Copy link
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
Copy link

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
Copy link
Contributor

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
Copy link

~ gb
fatal: Not a git repository (or any of the parent directories): .git
~ which gb
gb: aliased to git branch

This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants