0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Mac OSX でgitをauto-completionする

Last updated at Posted at 2020-09-13

git-completion.bashをダウンロードする

curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash -o ~/.git-completion.bash

~/.bash_profileを作成する

touch ~/.bash_profile

~/.bash_profileを修正する

vi ~/.bash_profile

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

~/.bash_profileの修正内容を有効する

source ~/.bash_profile

git branchを表示させる

こういう風にgit branchをターミナルに表示させる
Screen Shot 2020-09-13 at 21.06.09.png

以下のポストをご覧ください。
https://medium.com/@thucnc/how-to-show-current-git-branch-with-colors-in-bash-prompt-380d05a24745

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?