Git Bash Completion

In the source directory under contrib/completions there is a bash completions directory. After sourcing that file you can then git <tab> <tab> and get all the git commands. You can also setup $PS1 to show you what branch is currently active with:


export PS1='[...]$(__git_ps1 "(%s)")[...]'

Make sure you use single quotes on the outside or it won’t work.

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