Git自動補全配置安裝(Mac版本)

2021-10-09 02:36:14 字數 765 閱讀 9737

brew install bash-completion
git clone
複製 git-completion.bash

源**下有個 contrib/completion 目錄,有個 git-completion.bash 檔案

cd git/contrib/completion/
cp git-completion.bash ~/.git-completion.bash
source ~/.git-completion.bash
將下面**新增到~/.bash_profile(如果沒有該檔案,新建乙個)。

# git auto completition

if [ -f ~/.git-completion.bash ]; then

. ~/.git-completion.bash

fi

然後,source一下使其生效

source ~/.git-completion.bash

source ~/.bash_profile

這樣就可以,按下tab鍵就可以提示啦。(如果還不可以,重啟終端試試)

$ git che

checkout cherry cherry-pick

mac配置git命令自動補全

在mac上安裝了git之後,發現命令不能自動補全,使用起來非常不方便,本文記錄怎麼讓git命令能夠自動補全。安裝補全工具 brew install bash completion 應用 brew info bash completion 從github上clone git的原始碼到本地 clone整...

git 自動補全

軟體版本 作業系統 ubuntu10.04 核心版本 linux version 2.6.32 36 generic git 版本 git version 1.7.0.4 6.參考資料 1.介紹 2.git 安裝 如果沒有安裝 git 在 ubuntu 下請使用下面的命令安裝 sudo apt ge...

git 自動補全

如果沒有安裝 git 在 ubuntu 下請使用下面的命令安裝 apt get install git core git clone git git.kernel.org pub scm git git.git 或者 好吧,要使用這個功能還需要乙個條件,就是系統的 shell 需要選用 bash 在...