How can I delete a git alias?

Daydreaming Duck picture Daydreaming Duck · May 7, 2014 · Viewed 22.4k times · Source

I'm learning to work with git, and I tried to set some aliases like this:

git config --global alias.trololo 'status'

So now when I type git trololo it works like git status.

Now trololo alias is not needed. How can I correctly delete it?

Answer

VonC picture VonC · May 7, 2014

You can try --unset in git config:

git config --global --unset alias.trololo

I find it safer than editing directly the config file (git config --global --edit)