Naming git branches is something most of us have down to a science. My branch naming pattern is usually {issue number}-short-feature-description, though many developers prefer to lead with the description and end with the issue.
Regardless of the pattern you use, having a feature like autocomplete can save you a lot of time typing or copy/pasting. Here's how you can implement autocomplete for git branches!
Start by downloading the git-completion.sh file from GitHub:
Next, add the following to your ~/.bash_profile file:
if [ -f ~/.git-completion.bash ]; then
. ~/.git-completion.bash
fi
The last step is restarting your terminal. Voila! Now you can type git checkout {search-string} and press tab to select the lone branch that matches or hit tab again to see all matches!
Autocomplete for git makes navigating all of my branches much faster!
Before we get started, it's worth me spending a brief moment introducing myself to you. My name is Mark (or @integralist if Twitter happens to be your communication tool of choice) and I currently work for BBC News in London England as a principal engineer/tech...
Chances are that any Web designers using our Ghostlab browser testing app, which allows seamless testing across all devices simultaneously, will have worked with responsive design in some shape or form. And as today's websites and devices become ever more varied, a plethora of responsive images...
The hottest device out there right now seems to be the iPad. iPad this, iPad that, iPod your mom. I'm underwhelmed with the device but that doesn't mean I shouldn't try to account for such devices on the websites I create. In Apple's...
Whenever you have a long page worth of content, you generally want to add a "top" anchor link at the bottom of the page so that your user doesn't have to scroll forever to get to the top. The only problem with this method is...
Discussion
JONATHAN DOS SANTOS
this needs to find it’s way into official distribuition!
Andras Somi
If you use zsh + oh-my-zsh, you can get the same effect with the git plugin.
Djibril
Can probably run source ~/.bash_profile if you don’t want to restart your terminal
this needs to find it’s way into official distribuition!
If you use zsh + oh-my-zsh, you can get the same effect with the git plugin.
Can probably run
source ~/.bash_profile
if you don’t want to restart your terminal