Git 之常用设置
用户设置
1 git config --global user.name "FNR_S" 2 3 git config --global user.email QQ@QQ.com 4 5 git config --global credential.helper manager
推荐设置:
# make an alias for "long listing" (double lower Case L): git config --global alias.ll "log --oneline --decorate --graph --all" # use notepad++ for commit Messages, rebase Control etc.: git config --global core.editor "'C:/app/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noPlugin" # make git to remove local copies of tags/branches that are no more available on the remote: git config –global fetch.prune true # force a rebase instead of merge whenever you pull git config –global pull.rebase true
配置第三方diff和merge软件:
- 配置BCompare为diff工具:
-
git config --global diff.guitool bc4 git config --global difftool.bc4.path "C:/app/Tools/Beyond Compare 4/BCompare.exe" git config --global difftool.bc4.trustExitCode false
- 配置BCompare为merge工具:
-
git config --global merge.tool bc4 git config --global mergetool.bc4.path "C:/app/Tools/Beyond Compare 4/BCompare.exe" git config --global mergetool.bc4.trustExitCode false
本文作者:无极至上
本文链接:https://www.cnblogs.com/songweiren/p/13072071.html
版权声明:本作品采用「署名-非商业性使用-相同方式共享 4.0 国际」许可协议进行许可。
标签:
git
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步