showing branch name in cygwin prompt


git-prompt.sh

git-prompt.sh 를 받는다.

$ pwd
/home/user/bin
$ wget https://....

~/.bashrc

~/.bashrc 파일에 다음 내용을 추가한다.

source ~/bin/git-prompt.sh
PS1='\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\[\e[0m\]$(__git_ps1 " (%s)")\n\$ '
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s