Git + Bash

0 views
Skip to first unread message

Ben Luo

unread,
Mar 5, 2010, 12:29:21 AM3/5/10
to shlug

David Fetter: Git + bash = win

1 person liked this
Modern git comes with a great way to improve your life: git-completion.bash. To use it, just add the following to your .bashrc:

if [ -f /etc/bash_completion ]; then

. /etc/bash_completion

export PS1='\h:\u:\w $(__git_ps1 "(%s) ")'

fi

Once you've done this, any time you're in a git subdirectory, the branch name will appear in your PS1.
Any time you're not, it won't.
Simple!

Devil Wang

unread,
Mar 5, 2010, 2:32:06 AM3/5/10
to sh...@googlegroups.com
Git has been integrated with Emacs.


Think about it, is there anything can not be done?

Emacs + git = everything.
-- 
Thanks & Regards  

Linux Developer: Devil Wang 
<wxje...@gmail.com>


Ben Luo

unread,
Mar 5, 2010, 2:33:35 AM3/5/10
to sh...@googlegroups.com
On Fri, Mar 5, 2010 at 3:32 PM, Devil Wang <wxje...@gmail.com> wrote:

Git has been integrated with Emacs.


Think about it, is there anything can not be done?

Emacs + git = everything.

目前主要在windows下用 emacs,不用git, 用mercurial

Thomas Iverson

unread,
Mar 5, 2010, 2:34:25 AM3/5/10
to sh...@googlegroups.com

git是好东西啊!!!

vivian huang

unread,
Mar 5, 2010, 4:16:16 AM3/5/10
to sh...@googlegroups.com

看工程时我想“要有call-tree diagram 和 caller-tree diagram",于是我找到doxygen
写注释时候我想"要像画图板那样画ascii art",于是我发现emacs aritis-mode
修改代码时候我想“要放肆的改代码”,于是又有git
大神说“所有重要的事在很久以前就已经被提到过“,在这个时代可以理解为”所有你想到的,在很久以前就已经存在那“
Reply all
Reply to author
Forward
0 new messages