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!
It's no secret that Facebook has become a major traffic driver for all types of websites. Nowadays even large corporations steer consumers toward their Facebook pages instead of the corporate websites directly. And of course there are Facebook "Like" and "Recommend" widgets on every website. One...
Feature detection via JavaScript is a client side best practice and for all the right reasons, but unfortunately that same functionality hasn't been available within CSS. What we end up doing is repeating the same properties multiple times with each browser prefix. Yuck. Another thing we...
The idea of Spyjax is nothing new. In pasts posts I've covered how you can spy on your user's history with both MooTools and jQuery. Today we'll cover how to check user history using the Dojo Toolkit.
The HTML
For the sake of this...
It's been quite a while since I've written a PHP grabber and the itch finally got to me. This time the victim is the International Movie Database, otherwise known as IMDB. IMDB has info on every movie ever made (or so it seems). Their...
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