How can I delete a git alias?

Issue

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?

Solution

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)

Answered By – VonC

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published