我觉得这个问题已经被解决过了,但是在找到一堆帖子后我找不到它。如何编辑我的Git配置?
我正在做一个关于Git的初学者教程。有人在我之前使用过这款Mac,并使用了多个Git应用程序(SourceTree等),它们似乎添加了各种配置偏好设置。
当我输入git config --list
时,我得到一个巨大的列表(如下所示),不像我在Lynda.com上观看的教程,其中作者只显示user.name和user.email的列表。
core.excludesfile=~/.gitignore
core.legacyheaders=false
core.quotepath=false
core.pager=less -r
mergetool.keepbackup=true
push.default=simple
color.ui=auto
color.interactive=auto
repack.usedeltabaseoffset=true
alias.s=status
alias.a=!git add . && git status
alias.au=!git add -u . && git status
alias.aa=!git add . && git add -u . && git status
alias.c=commit
alias.cm=commit -m
alias.ca=commit --amend
alias.ac=!git add . && git commit
alias.acm=!git add . && git commit -m
alias.l=log --graph --all --pretty=format:'%C(yellow)%h%C(cyan)%d%Creset %s %C(white)- %an, %ar%Creset'
alias.ll=log --stat --abbrev-commit
alias.lg=log --color --graph --pretty=format:'%C(bold white)%h%Creset -%C(bold green)%d%Creset %s %C(bold green)(%cr)%Creset %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
alias.llg=log --color --graph --pretty=format:'%C(bold white)%H %d%Creset%n%s%n%+b%C(bold blue)%an <%ae>%Creset %C(bold green)%cr (%ci)' --abbrev-commit
alias.d=diff
alias.master=checkout master
alias.spull=svn rebase
alias.spush=svn dcommit
alias.alias=!git config --list | grep 'alias\.' | sed 's/alias\.\([^=]*\)=\(.*\)/\1\ => \2/' | sort
include.path=~/.gitcinclude
include.path=.githubconfig
include.path=.gitcredential
diff.exif.textconv=exif
credential.helper=osxkeychain
mergetool.sourcetree.cmd=--null
user.name=username
user.email=email
最终,我想删除所有这些额外的设置。我尝试卸载Git,但这没有什么区别。有没有一个命令来撤销所有这些?任何帮助,将不胜感激。
Mac OS X 10.10.1 – bboysupaman