My new workflow includes creating a branch with git for every new feature, and adding the Pivotal story ID to the branch name. This gives me branch names that end up looking like this:

add_pulse_inputs_79045950

I don’t know about you, but it only took manually typing out 79045950 once before I started looking for a better way. Luckily, git has auto completion capabilities!

Auto-Completion

If you use the Bash shell, Git comes with a nice auto-completion script you can enable. Download it directly from the Git source code at https://github.com/git/git/blob/master/contrib/completion/git-completion.bash . Copy this file to your home directory, and add this to your .bashrc file:

source ~/git-completion.bash

If you want to set up Git to automatically have Bash shell completion for all users, copy this script to the /opt/local/etc/bash_completion.d directory on Mac systems or to the /etc/bash_completion.d/ directory on Linux systems. This is a directory of scripts that Bash will automatically load to provide shell completions.

Check out Git Basics Tips and Tricks for the full instructions, and make your life easier.

 

On Tumblr: http://junior-dev-lessons.tumblr.com/post/100176396858/tab-completion-for-git