githubteacher / githubfordevelopers-april

GitHub for Developers Training
4 stars 11 forks source link

If I want to rename or delete an alias, how do I do that? Do I have to edit .gitconfig? #144

Closed limeri closed 7 years ago

brianamarie commented 7 years ago

@limeri You can use --unset, like git config --unset alias.lol.

limeri commented 7 years ago

That doesn't seem to have worked:

$ git config --global alias.lol "log"
$ git config --unset alias.lol
limera@USENLIMERAL3C MINGW64 ~/training/github-games (gh-pages)
$ git config --list
core.symlinks=false
core.autocrlf=true
core.fscache=true
color.diff=auto
color.status=auto
color.branch=auto
color.interactive=true
help.format=html
http.sslcainfo=C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
diff.astextplain.textconv=astextplain
rebase.autosquash=true
credential.helper=manager
user.name=limeri
user.email=andrew.limeri@emc.com
core.editor=vi
core.autocrlf=true
push.default=simple
alias.bu=push --repo
alias.ss=status
alias.llall=log --oneline --graph --decorate --all
**alias.lol=log**
fetch.prune=true
core.repositoryformatversion=0
core.filemode=false
core.bare=false
core.logallrefupdates=true
core.symlinks=false
core.ignorecase=true
remote.origin.url=https://github.com/limeri/github-games.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.gh-pages.remote=origin
branch.gh-pages.merge=refs/heads/gh-pages
branch.readme-update.remote=origin
branch.readme-update.merge=refs/heads/readme-update
brianamarie commented 7 years ago

@limeri Let's try git config --global --unset-all alias.lol

limeri commented 7 years ago

That worked. Thanks.

brianamarie commented 7 years ago

👍