Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I delete a git alias?

Tags:

git

alias

People also ask

How do I edit a git alias?

Start a new branch. gitconfig file and add each alias under [alias], like so: Additionally, you can have repo-specific aliases. Just edit . git/config in the repo where you want to add the alias, and follow the same syntax.

Where is the git alias file?

Aliases are stored in git config files, which include ~/. gitconfig and path/to/project/. git/config . As a result, it's possible to store aliases in a per-project as well as a global state.


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)


In case someone has multiple values for the same alias and has got that:

$ git config --global --unset alias.trololo
warning: alias.trololo has multiple values

Use --unset-all

git config --global --unset-all

Or just:

vim ~/.gitconfig

And delete the alias lines.


You can remove it by deleting that line from the configuration file or you can try this:

git config --global --unset alias.YourAlias