반응형
MAC에서 __git_ps1을 적용하면 -bash: __git_ps1: command not found 과 같은 에러가 나온다. 아래와 같이 사용하면 git 저장소를 가진 디렉토리로 들어가면 branch 이름이 prompt에 나오게 된다. 아래는 필자가 사용하는 PS1 이다.
changhyeok.bae@Changhyeoks-MBP~/work/yocto/poky (krogoth) $ cat ~/.bash_profile
source /Applications/Xcode.app/Contents/Developer/usr/share/git-core/git-prompt.sh
export PS1='\[\033[01;32m\]\u@\h\[\033[01;34m\]\w\[\033[01;33m\]$(__git_ps1)\[\033[01;34m\] \$\[\033[00m\] '
Reference: https://stackoverflow.com/questions/12870928/mac-bash-git-ps1-command-not-found
728x90
반응형
'Development' 카테고리의 다른 글
Docker에서 ssh daemon 실행하여 접근하기 (0) | 2023.04.21 |
---|---|
github python API (PyGithub) (0) | 2023.04.21 |
Automotive Linux Summit (ALS) 2017 참석 후기 (0) | 2023.04.20 |
AGL (Automotive Grade Linux)와 GENIVI 간단한 소개 및 Contribution하는 방법 (0) | 2023.04.20 |
GENIVI Development Platform (GDP) Build Speed (Yocto) (0) | 2023.04.20 |