mac环境 git 子命令 补全:

 

1.安装 :home-brew (包管理工具)—官网:  http://brew.sh/git

2.命令 : /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"github

3.安装 bash-completion:      命令: brew install bash-completionruby

4.查找文件  :   sudo find / -name git-completion.bashbash

5.拷贝文件  :  cp /Library/Developer/CommandLineTools/usr/share/git-core/git-completion.bash ~/.git-completion.bashcurl

6.source 文件:  source ~/.git-completion.bash工具

7.修改或建立文件: ~/.bash_profile  内容为:url

if [ -f ~/.bashrc ]; thenit

   source ~/.bashrcio

fiast

8.增长或修改 .bashrc 内容为:

source ~/.git-completion.bash

 

9.重启终端

相关文章
相关标签/搜索