Wiki

Clone wiki

environments / WLinux 設定

gitの初期設定

$ git config --global user.name "First-name Family-name"
$ git config --global user.email "username@example.com"
$ git config --global color.diff auto
$ git config --global color.status auto
$ git config --global color.branch auto
$ git config --global core.filemode false
$ git config --global core.autocrlf input

git-promtpの設定

  1. git-promptファイルのダウンロードと設定
$ wget https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh -O ~/.git-prompt.sh
$ chmod a+x ~/.git-prompt.sh
$ echo "source ~/.git-prompt.sh" >> ~/.bashrc
$ vim .bashrc
  1. .bashrc の PS1 を下記のように変更
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\] $(__git_ps1 "(%s)")\$ '

Updated