美文网首页
三、git、ssh相关

三、git、ssh相关

作者: BULL_DEBUG | 来源:发表于2022-01-17 09:18 被阅读0次

如何使用Homebrew在Mac上安装Git

Mac下ssh key配置

在Mac终端显示 Git 当前所在分支

1、
cd ~
2、
open .zshrc (如果有)
3、添加如下配置方案代码
function parse_git_branch() {
    git branch 2> /dev/null | sed -n -e 's/^\* \(.*\)/[\1]/p'
}

setopt PROMPT_SUBST
export PROMPT='%F{grey}%n%f %F{cyan}%~%f %F{green}$(parse_git_branch)%f %F{normal}$%f '

4、执行 source ~/.zshrc

相关文章

网友评论

      本文标题:三、git、ssh相关

      本文链接:https://www.haomeiwen.com/subject/dsiacrtx.html